On 10 Feb 2010, at 18:46, John W. Eaton wrote:
OK, then try
running Octave with
./run-octave -g
then at the (gdb) prompt, type "run", then at the Octave prompt, cd to
the src/DLD-FUNCTIONS directory and type "test lu". That should
result in the same segfault and you should be able to get information
about where the crash happens and examine the variables in scope at
the time of the crash.
jwe
running the tests manually I found where the crash is:
>> [l, u, p] = lu ([1, 2; 3, 4]);
Reading symbols for shared libraries . done
>> p
p =
Permutation Matrix
0 1
1 0
>> assert(p(:,:), [0, 1; 1, 0], sqrt (eps));
Program received signal EXC_BAD_ACCESS, Could not access memory.
Reason: KERN_INVALID_ADDRESS at address: 0x9b12d1e0
get_dispatch_type (address@hidden, address@hidden) at
symtab.cc:528
528 btyp = sup_table[btyp][args(i).builtin_type ()];
(gdb)
It seems that the problem is in comparing the permutation matrix p with
the full matrix [0, 1; 1, 0]
Indeed, changing the test to:
>> [l, u, p] = lu ([1, 2; 3, 4]);
>> assert(full(p), [0, 1; 1, 0], sqrt (eps));
>>
I don't get the crash anymore...
c.