cristicbz / scid

Scientific library for the D programming language
Boost Software License 1.0
23 stars 8 forks source link

Segfault y * inv(x) #82

Closed dsimcha closed 12 years ago

dsimcha commented 12 years ago

This code segfaults in the Blas dswap function:

import scid.matvec;

void main() {
    auto x = Matrix!double([ [ 1, 2, 3 ], [  1, 1, 1 ], [ 2, -1, 1 ] ]);
    auto y = Matrix!double([ [ 1, 2, 0 ], [ -2, 3, 4 ], [ 0,  2, 1 ] ]);

    eval(y*inv(x));
}

I can't prove that it's not a bug in Blas, though, so if noone else can reproduce it then we'll close it.

dsimcha commented 12 years ago

I can't reproduce this on Windows. I originally filed it on Debian and I know Debian/Ubuntu's Atlas package is somewhat buggy. It's probably a bug in Blas.

dsimcha commented 12 years ago

Scratch that. This looks like a regression. I couldn't reproduce it because I was testing with an old version of SciD.

dsimcha commented 12 years ago

Fixed. Another regression introduced by trying to fix 64-bit-related issues. This kind of stuff should happen a lot less now that we have decent automated tests.

https://github.com/cristicbz/scid/commit/5007744e20e43c97dad4cf26afaaeecacb67ff5a