Follow-up Comment #3, bug #66026 (group gsl): Here's what my user who found this problem, says:
fyi
More info for if those gsl guys start a discussion:
1.) ./a.out 128 128 or 256 256 or 512 512 or 1024 1024 does not crash,
so you don't always get the fault.
2.) The problem might be the status of a singular matrix:
status = LU_decomp_L3 (&AL.matrix, ipiv);
If not singular then status = 0 and all fields of vector ipiv are valid(have
been processed).
if singular then status = number of fields which have been processed.
For example: singular 127x127 status = 16
means that this is wrong:
for (i = 0; i < minMN; ++i) { # the segfault area
Better is this:
size_t damage = minMN;
if (status) damage = status;
for (i = 0; i < damage; ++i) {
}
Even better (perhaps)
if (status) { ; /* singular, do nothing */
} else {
for (i = 0; i < minMN; ++i) {
:
}
gsl_vector_uint_free(ipiv);
return status;
Performance back: no calloc and in case of singular dismiss signum as
valueless.
_______________________________________________________
Reply to this item at:
<https://savannah.gnu.org/bugs/?66026>
_______________________________________________
Message sent via Savannah
https://savannah.gnu.org/
signature.asc
Description: PGP signature
