[lapack] 08/10: New patches taken from upstream:
Sébastien Villemot
sebastien at debian.org
Sat Oct 31 22:23:43 UTC 2015
This is an automated email from the git hooks/post-receive script.
sebastien pushed a commit to branch master
in repository lapack.
commit 94a9713cbdeb59829c47e67120ddd402b823ab84
Author: Sébastien Villemot <sebastien at debian.org>
Date: Sat Oct 31 22:27:18 2015 +0100
New patches taken from upstream:
+ dlange_rowmajor_inconsistent.patch
+ dlansy_1_norm_segfault.patch
+ dormlq_interface_check.patch
Gbp-Dch: Full
---
debian/patches/dlange_rowmajor_inconsistent.patch | 159 +++++++++++++++++
debian/patches/dlansy_1_norm_segfault.patch | 207 ++++++++++++++++++++++
debian/patches/dormlq_interface_check.patch | 103 +++++++++++
debian/patches/series | 3 +
4 files changed, 472 insertions(+)
diff --git a/debian/patches/dlange_rowmajor_inconsistent.patch b/debian/patches/dlange_rowmajor_inconsistent.patch
new file mode 100644
index 0000000..c16a5a1
--- /dev/null
+++ b/debian/patches/dlange_rowmajor_inconsistent.patch
@@ -0,0 +1,159 @@
+Description: Dlange gives inconsistent/incorrect results for RowMajor (upstream bug #137)
+Origin: backport, commit: r1602
+Bug: https://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4789&p=0#p0
+Reviewed-by: Sébastien Villemot <sebastien at debian.org>
+Last-Update: 2015-10-31
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lapacke/src/lapacke_clantr.c
++++ b/lapacke/src/lapacke_clantr.c
+@@ -53,7 +53,7 @@ float LAPACKE_clantr( int matrix_order,
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, 'O' ) ) {
+- work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) );
++ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,MAX(m,n)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+--- a/lapacke/src/lapacke_clantr_work.c
++++ b/lapacke/src/lapacke_clantr_work.c
+@@ -47,7 +47,7 @@ float LAPACKE_clantr_work( int matrix_or
+ info = info - 1;
+ }
+ } else if( matrix_order == LAPACK_ROW_MAJOR ) {
+- lapack_int lda_t = MAX(1,n);
++ lapack_int lda_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+@@ -57,13 +57,13 @@ float LAPACKE_clantr_work( int matrix_or
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_float*)
+- LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,n) );
++ LAPACKE_malloc( sizeof(lapack_complex_float) * lda_t * MAX(1,MAX(m,n)) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+- LAPACKE_ctr_trans( matrix_order, uplo, diag, n, a, lda, a_t, lda_t );
++ LAPACKE_ctr_trans( matrix_order, uplo, diag, MAX(m,n), a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_clantr( &norm, &uplo, &diag, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+--- a/lapacke/src/lapacke_dlantr.c
++++ b/lapacke/src/lapacke_dlantr.c
+@@ -53,7 +53,7 @@ double LAPACKE_dlantr( int matrix_order,
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, 'O' ) ) {
+- work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
++ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,MAX(m,n)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+--- a/lapacke/src/lapacke_dlantr_work.c
++++ b/lapacke/src/lapacke_dlantr_work.c
+@@ -46,7 +46,7 @@ double LAPACKE_dlantr_work( int matrix_o
+ info = info - 1;
+ }
+ } else if( matrix_order == LAPACK_ROW_MAJOR ) {
+- lapack_int lda_t = MAX(1,n);
++ lapack_int lda_t = MAX(1,m);
+ double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+@@ -55,13 +55,13 @@ double LAPACKE_dlantr_work( int matrix_o
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+- a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,n) );
++ a_t = (double*)LAPACKE_malloc( sizeof(double) * lda_t * MAX(1,MAX(m,n)) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+- LAPACKE_dtr_trans( matrix_order, uplo, diag, n, a, lda, a_t, lda_t );
++ LAPACKE_dtr_trans( matrix_order, uplo, diag, MAX(m,n), a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_dlantr( &norm, &uplo, &diag, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+--- a/lapacke/src/lapacke_slantr.c
++++ b/lapacke/src/lapacke_slantr.c
+@@ -53,7 +53,7 @@ float LAPACKE_slantr( int matrix_order,
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, 'O' ) ) {
+- work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) );
++ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,MAX(m,n)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+--- a/lapacke/src/lapacke_slantr_work.c
++++ b/lapacke/src/lapacke_slantr_work.c
+@@ -46,7 +46,7 @@ float LAPACKE_slantr_work( int matrix_or
+ info = info - 1;
+ }
+ } else if( matrix_order == LAPACK_ROW_MAJOR ) {
+- lapack_int lda_t = MAX(1,n);
++ lapack_int lda_t = MAX(1,m);
+ float* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+@@ -55,13 +55,13 @@ float LAPACKE_slantr_work( int matrix_or
+ return info;
+ }
+ /* Allocate memory for temporary array(s) */
+- a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,n) );
++ a_t = (float*)LAPACKE_malloc( sizeof(float) * lda_t * MAX(1,MAX(m,n)) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+- LAPACKE_str_trans( matrix_order, uplo, diag, n, a, lda, a_t, lda_t );
++ LAPACKE_str_trans( matrix_order, uplo, diag, MAX(m,n), a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_slantr( &norm, &uplo, &diag, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
+--- a/lapacke/src/lapacke_zlantr.c
++++ b/lapacke/src/lapacke_zlantr.c
+@@ -53,7 +53,7 @@ double LAPACKE_zlantr( int matrix_order,
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+ LAPACKE_lsame( norm, 'O' ) ) {
+- work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
++ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,MAX(m,n)) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+ goto exit_level_0;
+--- a/lapacke/src/lapacke_zlantr_work.c
++++ b/lapacke/src/lapacke_zlantr_work.c
+@@ -47,7 +47,7 @@ double LAPACKE_zlantr_work( int matrix_o
+ info = info - 1;
+ }
+ } else if( matrix_order == LAPACK_ROW_MAJOR ) {
+- lapack_int lda_t = MAX(1,n);
++ lapack_int lda_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ /* Check leading dimension(s) */
+ if( lda < n ) {
+@@ -57,13 +57,13 @@ double LAPACKE_zlantr_work( int matrix_o
+ }
+ /* Allocate memory for temporary array(s) */
+ a_t = (lapack_complex_double*)
+- LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,n) );
++ LAPACKE_malloc( sizeof(lapack_complex_double) * lda_t * MAX(1,MAX(m,n)) );
+ if( a_t == NULL ) {
+ info = LAPACK_TRANSPOSE_MEMORY_ERROR;
+ goto exit_level_0;
+ }
+ /* Transpose input matrices */
+- LAPACKE_ztr_trans( matrix_order, uplo, diag, n, a, lda, a_t, lda_t );
++ LAPACKE_ztr_trans( matrix_order, uplo, diag, MAX(m,n), a, lda, a_t, lda_t );
+ /* Call LAPACK function and adjust info */
+ res = LAPACK_zlantr( &norm, &uplo, &diag, &m, &n, a_t, &lda_t, work );
+ info = 0; /* LAPACK call is ok! */
diff --git a/debian/patches/dlansy_1_norm_segfault.patch b/debian/patches/dlansy_1_norm_segfault.patch
new file mode 100644
index 0000000..1eb917b
--- /dev/null
+++ b/debian/patches/dlansy_1_norm_segfault.patch
@@ -0,0 +1,207 @@
+Description: LAPACKE_dlansy et al cause segfault with 1-norm (upstream bug #135)
+Origin: upstream, commit: r1587
+Bug: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4793
+Reviewed-by: Sébastien Villemot <sebastien at debian.org>
+Last-Update: 2015-10-31
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lapacke/src/lapacke_clanhe.c
++++ b/lapacke/src/lapacke_clanhe.c
+@@ -51,7 +51,7 @@ float LAPACKE_clanhe( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -62,7 +62,7 @@ float LAPACKE_clanhe( int matrix_order,
+ res = LAPACKE_clanhe_work( matrix_order, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
+--- a/lapacke/src/lapacke_clansy.c
++++ b/lapacke/src/lapacke_clansy.c
+@@ -51,7 +51,7 @@ float LAPACKE_clansy( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -62,7 +62,7 @@ float LAPACKE_clansy( int matrix_order,
+ res = LAPACKE_clansy_work( matrix_order, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
+--- a/lapacke/src/lapacke_clantr.c
++++ b/lapacke/src/lapacke_clantr.c
+@@ -52,7 +52,7 @@ float LAPACKE_clantr( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -64,7 +64,7 @@ float LAPACKE_clantr( int matrix_order,
+ work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
+--- a/lapacke/src/lapacke_dlansy.c
++++ b/lapacke/src/lapacke_dlansy.c
+@@ -51,7 +51,7 @@ double LAPACKE_dlansy( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -62,7 +62,7 @@ double LAPACKE_dlansy( int matrix_order,
+ res = LAPACKE_dlansy_work( matrix_order, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
+--- a/lapacke/src/lapacke_dlantr.c
++++ b/lapacke/src/lapacke_dlantr.c
+@@ -52,7 +52,7 @@ double LAPACKE_dlantr( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -64,7 +64,7 @@ double LAPACKE_dlantr( int matrix_order,
+ work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
+--- a/lapacke/src/lapacke_slansy.c
++++ b/lapacke/src/lapacke_slansy.c
+@@ -51,7 +51,7 @@ float LAPACKE_slansy( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -62,7 +62,7 @@ float LAPACKE_slansy( int matrix_order,
+ res = LAPACKE_slansy_work( matrix_order, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
+--- a/lapacke/src/lapacke_slantr.c
++++ b/lapacke/src/lapacke_slantr.c
+@@ -52,7 +52,7 @@ float LAPACKE_slantr( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (float*)LAPACKE_malloc( sizeof(float) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -64,7 +64,7 @@ float LAPACKE_slantr( int matrix_order,
+ work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
+--- a/lapacke/src/lapacke_zlanhe.c
++++ b/lapacke/src/lapacke_zlanhe.c
+@@ -51,7 +51,7 @@ double LAPACKE_zlanhe( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -62,7 +62,7 @@ double LAPACKE_zlanhe( int matrix_order,
+ res = LAPACKE_zlanhe_work( matrix_order, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
+--- a/lapacke/src/lapacke_zlansy.c
++++ b/lapacke/src/lapacke_zlansy.c
+@@ -51,7 +51,7 @@ double LAPACKE_zlansy( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,n) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -62,7 +62,7 @@ double LAPACKE_zlansy( int matrix_order,
+ res = LAPACKE_zlansy_work( matrix_order, norm, uplo, n, a, lda, work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
+--- a/lapacke/src/lapacke_zlantr.c
++++ b/lapacke/src/lapacke_zlantr.c
+@@ -52,7 +52,7 @@ double LAPACKE_zlantr( int matrix_order,
+ #endif
+ /* Allocate memory for working array(s) */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ work = (double*)LAPACKE_malloc( sizeof(double) * MAX(1,m) );
+ if( work == NULL ) {
+ info = LAPACK_WORK_MEMORY_ERROR;
+@@ -64,7 +64,7 @@ double LAPACKE_zlantr( int matrix_order,
+ work );
+ /* Release memory and exit */
+ if( LAPACKE_lsame( norm, 'i' ) || LAPACKE_lsame( norm, '1' ) ||
+- LAPACKE_lsame( norm, '0' ) ) {
++ LAPACKE_lsame( norm, 'O' ) ) {
+ LAPACKE_free( work );
+ }
+ exit_level_0:
diff --git a/debian/patches/dormlq_interface_check.patch b/debian/patches/dormlq_interface_check.patch
new file mode 100644
index 0000000..fc24d61
--- /dev/null
+++ b/debian/patches/dormlq_interface_check.patch
@@ -0,0 +1,103 @@
+Description: Dormlq C interface error check (upstream bug #133)
+Origin: backport, commit: r1586
+Bug: http://icl.cs.utk.edu/lapack-forum/viewtopic.php?f=13&t=4771
+Reviewed-by: Sébastien Villemot <sebastien at debian.org>
+Last-Update: 2015-10-31
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/lapacke/src/lapacke_cunmlq_work.c
++++ b/lapacke/src/lapacke_cunmlq_work.c
+@@ -41,6 +41,7 @@ lapack_int LAPACKE_cunmlq_work( int matr
+ lapack_complex_float* work, lapack_int lwork )
+ {
+ lapack_int info = 0;
++ lapack_int r;
+ if( matrix_order == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_cunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+@@ -49,12 +50,13 @@ lapack_int LAPACKE_cunmlq_work( int matr
+ info = info - 1;
+ }
+ } else if( matrix_order == LAPACK_ROW_MAJOR ) {
++ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_float* a_t = NULL;
+ lapack_complex_float* c_t = NULL;
+ /* Check leading dimension(s) */
+- if( lda < m ) {
++ if( lda < r ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_cunmlq_work", info );
+ return info;
+--- a/lapacke/src/lapacke_dormlq_work.c
++++ b/lapacke/src/lapacke_dormlq_work.c
+@@ -40,6 +40,7 @@ lapack_int LAPACKE_dormlq_work( int matr
+ double* work, lapack_int lwork )
+ {
+ lapack_int info = 0;
++ lapack_int r;
+ lapack_int lda_t, ldc_t;
+ double *a_t = NULL, *c_t = NULL;
+ if( matrix_order == LAPACK_COL_MAJOR ) {
+@@ -50,10 +51,11 @@ lapack_int LAPACKE_dormlq_work( int matr
+ info = info - 1;
+ }
+ } else if( matrix_order == LAPACK_ROW_MAJOR ) {
++ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+- if( lda < m ) {
++ if( lda < r ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_dormlq_work", info );
+ return info;
+--- a/lapacke/src/lapacke_sormlq_work.c
++++ b/lapacke/src/lapacke_sormlq_work.c
+@@ -40,6 +40,7 @@ lapack_int LAPACKE_sormlq_work( int matr
+ float* work, lapack_int lwork )
+ {
+ lapack_int info = 0;
++ lapack_int r;
+ lapack_int lda_t, ldc_t;
+ float *a_t = NULL, *c_t = NULL;
+ if( matrix_order == LAPACK_COL_MAJOR ) {
+@@ -50,10 +51,11 @@ lapack_int LAPACKE_sormlq_work( int matr
+ info = info - 1;
+ }
+ } else if( matrix_order == LAPACK_ROW_MAJOR ) {
++ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lda_t = MAX(1,k);
+ ldc_t = MAX(1,m);
+ /* Check leading dimension(s) */
+- if( lda < m ) {
++ if( lda < r ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_sormlq_work", info );
+ return info;
+--- a/lapacke/src/lapacke_zunmlq_work.c
++++ b/lapacke/src/lapacke_zunmlq_work.c
+@@ -41,6 +41,7 @@ lapack_int LAPACKE_zunmlq_work( int matr
+ lapack_complex_double* work, lapack_int lwork )
+ {
+ lapack_int info = 0;
++ lapack_int r;
+ if( matrix_order == LAPACK_COL_MAJOR ) {
+ /* Call LAPACK function and adjust info */
+ LAPACK_zunmlq( &side, &trans, &m, &n, &k, a, &lda, tau, c, &ldc, work,
+@@ -49,12 +50,13 @@ lapack_int LAPACKE_zunmlq_work( int matr
+ info = info - 1;
+ }
+ } else if( matrix_order == LAPACK_ROW_MAJOR ) {
++ r = LAPACKE_lsame( side, 'l' ) ? m : n;
+ lapack_int lda_t = MAX(1,k);
+ lapack_int ldc_t = MAX(1,m);
+ lapack_complex_double* a_t = NULL;
+ lapack_complex_double* c_t = NULL;
+ /* Check leading dimension(s) */
+- if( lda < m ) {
++ if( lda < r ) {
+ info = -8;
+ LAPACKE_xerbla( "LAPACKE_zunmlq_work", info );
+ return info;
diff --git a/debian/patches/series b/debian/patches/series
index f35140e..1f52ac7 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -6,3 +6,6 @@ doxygen-exclude-binary-objects.patch
cgesvd-zgesvd-stack-corruption.patch
zstemr-n2.patch
zlanhf-clanhf-norm.patch
+dormlq_interface_check.patch
+dlansy_1_norm_segfault.patch
+dlange_rowmajor_inconsistent.patch
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/lapack.git
More information about the debian-science-commits
mailing list