[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #49235] test inv crashes when compiled with In
From: |
Dario Meluzzi |
Subject: |
[Octave-bug-tracker] [bug #49235] test inv crashes when compiled with Intel compiler |
Date: |
Thu, 22 Jun 2017 23:13:04 -0400 (EDT) |
User-agent: |
Mozilla/5.0 (Windows NT 6.1; WOW64; rv:54.0) Gecko/20100101 Firefox/54.0 |
Follow-up Comment #2, bug #49235 (project octave):
I encountered the same problem when running make check with octave-4.2.1
compiled on Ubuntu 14.04. Also running inv([1 2;3 4]) at the command line
crashes the program with a similar stack trace. I investigated the problem and
found the cause to be an insufficiently large work array passed to LAPACK
subroutines dgecon and sgecon when they called in files
liboctave/array/[df]Matrix.cc. In fact there are four calls to those
subroutines in each of those files. Three of the calls pass a work array of
the correct size, while the remaining call does not. As stated in the
subroutine definitions (see for example
https://fossies.org/linux/OpenBLAS/lapack-netlib/SRC/dgecon.f), the size of
the work array must be 4*N, where N is the order of the matrix, but the faulty
calls pass an array of size 2*N.
The fix is trivial.
diff octave-4.2.1-bugs/liboctave/array/dMatrix.cc
octave-4.2.1/liboctave/array/dMatrix.cc
549c549
< lwork = (lwork < 2 *nc ? 2*nc : lwork);
---
> lwork = (lwork < 4 *nc ? 4*nc : lwork);
diff octave-4.2.1-bugs/liboctave/array/fMatrix.cc
octave-4.2.1/liboctave/array/fMatrix.cc
555c555
< lwork = (lwork < 2 *nc ? 2*nc : lwork);
---
> lwork = (lwork < 4 *nc ? 4*nc : lwork);
(file #41029)
_______________________________________________________
Additional Item Attachment:
File name: array.diff Size:0 KB
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?49235>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #49235] test inv crashes when compiled with Intel compiler,
Dario Meluzzi <=