indexing crash with current tip
Jaroslav Hajek
highegg at gmail.com
Thu Apr 16 01:46:58 CDT 2009
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)
--
RNDr. Jaroslav Hajek
computing expert & GNU Octave developer
Aeronautical Research and Test Institute (VZLU)
Prague, Czech Republic
url: www.highegg.matfyz.cz
More information about the Bug-octave
mailing list