octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #45577] Solving systems using complex NaN caus


From: Rik
Subject: [Octave-bug-tracker] [bug #45577] Solving systems using complex NaN causes crash
Date: Sat, 10 Oct 2015 23:48:52 +0000
User-agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1)

Update of bug #45577 (project octave):

                  Status:               Confirmed => Fixed                  
             Open/Closed:                    Open => Closed                 

    _______________________________________________________

Follow-up Comment #3:

The problem seems not to be in Octave, but rather in the ZGETRF function from
lapack.  The code which calls ZGETRF is in liboctave/array/CMatrix.cc.  In
Octave we use the exact same code sequence for double matrices, single
matrices, single complex matrices, and double complex matrices.  There are
only slight changes to reflect the different inputs.  Thus, for single complex
matrices the routine is CGETRF and for regular double matrices it is DGETRF. 
None of the other routines produce segfaults if the input matrix has a row or
column of NaN values--it is only double complex matrices which call ZGETRF.

Because it is only one routine, I have worked around the issue in Octave.  The
norm of the matrix is calculated before the LU decomposition and if the norm
is NaN that is an indication not to call lapack and, instead, issue a
warning.

Interestingly, in searching through CMatrix.cc for calls to ZGETRF I found
three other instances: finverse, determinant, rcond.  Sure enough, trying to
calculate the determinant or rcond of the problem matrix in this bug report
produces a segfault.  So I patched those too.

Since this is a serious crash of the interpreter I fixed the problem on the
stable branch.  See this changeset
(http://hg.savannah.gnu.org/hgweb/octave/rev/ffc6cdcd02c5).

Closing report.

    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?45577>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]