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

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

[Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty s


From: Rik
Subject: [Octave-bug-tracker] [bug #56232] Octave crash when inverting an empty sparse matrix.
Date: Wed, 8 May 2019 13:06:17 -0400 (EDT)
User-agent: Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; rv:11.0) like Gecko

Follow-up Comment #41, bug #56232 (project octave):

In one sense, the current behavior is actually nicer.  When you attempt to
invert a sparse singular matrix it prints an error message and then refuses to
waste memory creating a full array filled with not particularly useful values
(Inf or NaN).

I would be comfortable with this behavior (but, make the message explicit that
this was a singular matrix rather than division-by-zero).  There are many
other instances where Octave does more extensive input validation and doesn't
perform a garbage in / garbage out calculation.

But, if we really want to return something, then returning an effectively full
array seems like a bad idea.  There will be fat-fingered people who create an
empty large spare array and then mistakenly try to invert it.  If the size is
large enough the request for memory will fail immediately.  That's the best
outcome.  If the size is larger than main memory but less than main + swap
then Octave will proceed and I find that it can be a minute or more before a
Ctrl+C is recognized.



    _______________________________________________________

Reply to this item at:

  <https://savannah.gnu.org/bugs/?56232>

_______________________________________________
  Message sent via Savannah
  https://savannah.gnu.org/




reply via email to

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