[Top][All Lists]

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

[Octave-bug-tracker] [bug #34868] subsref crashes octave

From: John W. Eaton
Subject: [Octave-bug-tracker] [bug #34868] subsref crashes octave
Date: Mon, 21 Nov 2011 22:05:02 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 Iceweasel/7.0.1

Follow-up Comment #7, bug #34868 (project octave):

I think the error makes sense as you are trying to index an object but given
the empty struct, you have not told subsref what type of indexing you are
attempting or what the values of the index are.  There is no equivalent for
this in the syntax of the scripting language itself, so why should it not be
an error here as well?

I guess you are trying to avoid having to check to see whether the subscript
argument is empty in your code?

But by avoiding the error and simply returning the original, I think it would
be easy to hide actual errors and silently return incorrect results.  I'm not
sure that possibility is worth the added convenience.  At least, I think we
should discuss this on the maintainers list before making such a change.

Until then, I think something like Rik's patch should be applied to avoid the
crash.  But maybe it should just check the number of elements of the indexing
struct directly?


Reply to this item at:


  Message sent via/by Savannah

reply via email to

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