dimension mismatch in spdiags leads to core dump

Jaroslav Hajek highegg at gmail.com
Tue Jun 16 03:58:08 CDT 2009


On Tue, Jun 16, 2009 at 9:52 AM, Jaroslav Hajek<highegg at gmail.com> wrote:
> On Tue, Jun 16, 2009 at 3:07 AM, Elias Pipping<elias at pipping.org> wrote:
>> --------
>> Bug report for Octave 3.2.0 configured for x86_64-pc-linux-gnu
>>
>> Description:
>> -----------
>>
>>  * I meant to write
>>
>>       n=200; e=ones(n,1); A=spdiags([e 4*e e], -1:1, n, n);
>>
>>    but instead wrote
>>
>>       n=200; e=ones(n,1); A=spdiags([e 4*e e], -1:1, n);
>>
>>    which led to the error
>>
>>      error: A(I,J,...) = X: dimensions mismatch
>>      error: called from:
>>      error:   /usr/share/octave/3.2.0/m/sparse/spdiags.m at line 71, column 29
>>      error:   /usr/share/octave/3.2.0/m/sparse/spdiags.m at line 76, column 7
>>
>>    however, when running the same erroneous command again, I got
>>
>>      octave: symtab.h:1065: static void symbol_table::force_variable(const std::string&, int, size_t): Assertion `xcurrent_context == 0' failed.
>>      panic: Aborted -- stopping myself...
>>      attempting to save variables to `octave-core'...
>>      save to `octave-core' complete
>>      Aborted
>>
>
>
> Ugh, this was tricky.  The following patch fixes the problem for me:
> http://hg.savannah.gnu.org/hgweb/octave/rev/5e4da3b3747e
>
>

Patch also transplanted to 3.2.x.

-- 
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