indexing crash with current tip
Kai Habel
kai.habel at gmx.de
Thu Apr 16 02:00:47 CDT 2009
Jaroslav Hajek schrieb:
> On Thu, Apr 16, 2009 at 8:45 AM, Jaroslav Hajek <highegg at gmail.com> wrote:
>
>> On Wed, Apr 15, 2009 at 5:37 PM, Kai Habel <kai.habel at gmx.net> wrote:
>>
>>> Hello all,
>>>
>>> I don't know if I have messed up my installation, but with the current
>>> tip I see the following crash:
>>>
>>> [New Thread 0xb58bb8e0 (LWP 28986)]
>>> octave:1> u(end-2:end)
>>> error: invalid use of end
>>> error: invalid base value in colon expression
>>> error: evaluating argument list element number 1
>>> error: evaluating argument list element number 1
>>> octave:1> u(end-2:end)=0
>>> *** glibc detected *** /usr/local/bin/octave: free(): invalid pointer:
>>> 0x0843f180 ***
>>>
>> Fixed in development archive:
>> http://hg.savannah.gnu.org/hgweb/octave/rev/47f19c11b558
>>
>> Still, can anyone verify what Matlab does when it sees the magic end
>> within an undefined variable? Is assuming zero dimensions the correct
>> behavior? Maybe we should gripe?
>>
>>
>
> To be precise, what does matlab do (with u undefined):
> u(1:end)
> u(end+1) = 1
> u(end)
>
>
>
Hello
with 2007a I see:
>> u(1:end)
??? Undefined function or variable "u".
>> u(end+1)=1
??? Undefined function or variable "u".
>> u(end)
??? Undefined function or variable "u".
Kai
More information about the Bug-octave
mailing list