diff --git a/LAPACKE/src/lapacke_clacpy_work.c b/LAPACKE/src/lapacke_clacpy_work.c index b056c94a8..4b2a782cf 100644 --- a/LAPACKE/src/lapacke_clacpy_work.c +++ b/LAPACKE/src/lapacke_clacpy_work.c @@ -54,20 +54,6 @@ lapack_int API_SUFFIX(LAPACKE_clacpy_work)( int matrix_layout, char uplo, lapack API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_clacpy_work", info ); return info; } - /* Fix (issue #729): the previous code transposed the FULL m-by-n - * matrix through temporary buffers, which (a) read the uninitialized - * complementary region of the destination temporary and (b) wrote it - * back over the part of B that `uplo` requires to stay untouched, - * corrupting the caller's data and reading uninitialized memory. A - * row-major m-by-n matrix with leading dimension lda is bit-identical - * to a column-major n-by-m matrix (its transpose). Copying triangle - * `uplo` of the row-major matrix therefore equals copying the OPPOSITE - * triangle of that transpose, so swap U<->L and the m/n extents and - * call the Fortran kernel directly on a and b. This copies exactly the - * requested triangle and never touches the complementary region -- no - * full-matrix transpose, no temporary allocation, no uninitialized - * reads. uplo values other than 'U'/'L' (e.g. 'A'/'a', a full copy) - * are layout-agnostic and pass through unchanged. */ if( uplo == 'U' || uplo == 'u' ) { uplo_t = 'L'; } else if( uplo == 'L' || uplo == 'l' ) { diff --git a/LAPACKE/src/lapacke_dlacpy_work.c b/LAPACKE/src/lapacke_dlacpy_work.c index 6f5d57853..fe57a0d15 100644 --- a/LAPACKE/src/lapacke_dlacpy_work.c +++ b/LAPACKE/src/lapacke_dlacpy_work.c @@ -53,20 +53,6 @@ lapack_int API_SUFFIX(LAPACKE_dlacpy_work)( int matrix_layout, char uplo, lapack API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_dlacpy_work", info ); return info; } - /* Fix (issue #729): the previous code transposed the FULL m-by-n - * matrix through temporary buffers, which (a) read the uninitialized - * complementary region of the destination temporary and (b) wrote it - * back over the part of B that `uplo` requires to stay untouched, - * corrupting the caller's data and reading uninitialized memory. A - * row-major m-by-n matrix with leading dimension lda is bit-identical - * to a column-major n-by-m matrix (its transpose). Copying triangle - * `uplo` of the row-major matrix therefore equals copying the OPPOSITE - * triangle of that transpose, so swap U<->L and the m/n extents and - * call the Fortran kernel directly on a and b. This copies exactly the - * requested triangle and never touches the complementary region -- no - * full-matrix transpose, no temporary allocation, no uninitialized - * reads. uplo values other than 'U'/'L' (e.g. 'A'/'a', a full copy) - * are layout-agnostic and pass through unchanged. */ if( uplo == 'U' || uplo == 'u' ) { uplo_t = 'L'; } else if( uplo == 'L' || uplo == 'l' ) { diff --git a/LAPACKE/src/lapacke_slacpy_work.c b/LAPACKE/src/lapacke_slacpy_work.c index 92dcbaad8..72678f9a8 100644 --- a/LAPACKE/src/lapacke_slacpy_work.c +++ b/LAPACKE/src/lapacke_slacpy_work.c @@ -53,20 +53,6 @@ lapack_int API_SUFFIX(LAPACKE_slacpy_work)( int matrix_layout, char uplo, lapack API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_slacpy_work", info ); return info; } - /* Fix (issue #729): the previous code transposed the FULL m-by-n - * matrix through temporary buffers, which (a) read the uninitialized - * complementary region of the destination temporary and (b) wrote it - * back over the part of B that `uplo` requires to stay untouched, - * corrupting the caller's data and reading uninitialized memory. A - * row-major m-by-n matrix with leading dimension lda is bit-identical - * to a column-major n-by-m matrix (its transpose). Copying triangle - * `uplo` of the row-major matrix therefore equals copying the OPPOSITE - * triangle of that transpose, so swap U<->L and the m/n extents and - * call the Fortran kernel directly on a and b. This copies exactly the - * requested triangle and never touches the complementary region -- no - * full-matrix transpose, no temporary allocation, no uninitialized - * reads. uplo values other than 'U'/'L' (e.g. 'A'/'a', a full copy) - * are layout-agnostic and pass through unchanged. */ if( uplo == 'U' || uplo == 'u' ) { uplo_t = 'L'; } else if( uplo == 'L' || uplo == 'l' ) { diff --git a/LAPACKE/src/lapacke_zlacpy_work.c b/LAPACKE/src/lapacke_zlacpy_work.c index 993ce4821..b75a8a733 100644 --- a/LAPACKE/src/lapacke_zlacpy_work.c +++ b/LAPACKE/src/lapacke_zlacpy_work.c @@ -54,20 +54,6 @@ lapack_int API_SUFFIX(LAPACKE_zlacpy_work)( int matrix_layout, char uplo, lapack API_SUFFIX(LAPACKE_xerbla)( "LAPACKE_zlacpy_work", info ); return info; } - /* Fix (issue #729): the previous code transposed the FULL m-by-n - * matrix through temporary buffers, which (a) read the uninitialized - * complementary region of the destination temporary and (b) wrote it - * back over the part of B that `uplo` requires to stay untouched, - * corrupting the caller's data and reading uninitialized memory. A - * row-major m-by-n matrix with leading dimension lda is bit-identical - * to a column-major n-by-m matrix (its transpose). Copying triangle - * `uplo` of the row-major matrix therefore equals copying the OPPOSITE - * triangle of that transpose, so swap U<->L and the m/n extents and - * call the Fortran kernel directly on a and b. This copies exactly the - * requested triangle and never touches the complementary region -- no - * full-matrix transpose, no temporary allocation, no uninitialized - * reads. uplo values other than 'U'/'L' (e.g. 'A'/'a', a full copy) - * are layout-agnostic and pass through unchanged. */ if( uplo == 'U' || uplo == 'u' ) { uplo_t = 'L'; } else if( uplo == 'L' || uplo == 'l' ) {