Hi:

In porting the code in gsl-1.11 "linalg/bidiag.c" to work with complex matrices 
I found the following array/vector indices will most definitely be out-of-bounds when 
j==N:

linalg/bidiag.c:  lines 308-317:

     for (j = N; j > 0 && j--;)
       {
         /* Householder column transformation to accumulate U */
         double tj = gsl_vector_get (tau_U, j);
         double Ajj = gsl_matrix_get (A, j, j);
         gsl_matrix_view m = gsl_matrix_submatrix (A, j, j, M-j, N-j);

         gsl_vector_set (tau_U, j, Ajj);
         gsl_linalg_householder_hm1 (tj, &m.matrix);
       }


Note here that the _size_ of matrix A is M x N, with M >= N, and the _size_ of 
vector tau_U is min(M,N).

Almost certainly the index of the for loop should read:

"for (j = N-1; j > 0 && j--;)".


I hope that this can help the maintainers of this section!  Unfortunately, at 
this point I work exclusively in C++, otherwise I would definitely offer more 
help to this project.


Thanks,



--
Kort Travis

--
Biomedical Optics and Nanodiagnostics
Sokolov research group, ENS 30
--

Department of Physics, RLM 5.208
University of Texas at Austin
Austin, TX 78712

email:   [EMAIL PROTECTED]


_______________________________________________
Bug-gsl mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-gsl

Reply via email to