Segmentation fault from struct2cell
John W. Eaton
jwe at bevo.che.wisc.edu
Tue May 6 02:24:18 CDT 2008
On 6-May-2008, Gregor Beck wrote:
| Subject: Segmentation fault from struct2cell
| --------
| Bug report for Octave 3.0.0 configured for x86_64-unknown-linux-gnu
|
| Description:
| -----------
|
| struct2cell dosn't handle structure arrays correctly if size != [ 1 1 ] and may segfault
|
| Repeat-By:
| ---------
| octave:1> s.i=42;
| octave:2> assert(size(struct2cell([s,s])),[1 1 2])
| error: assert (size (struct2cell ([s, s])),[1, 1, 2]) expected
| 1 1 2
| but got
| 1 2
| Dimensions don't match
| error: called from `assert' in file `/usr/local/share/octave/3.0.0/m/testfun/assert.m'
| octave:3> struct2cell([s,s;s,s])
| panic: Segmentation fault -- stopping myself...
| attempting to save variables to `octave-core'...
| save to `octave-core' complete
| Segmentation fault (core dumped)
Please try the following patch.
Thanks,
jwe
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: diffs
Url: https://www.cae.wisc.edu/pipermail/bug-octave/attachments/20080506/2c447128/attachment-0001.ksh
More information about the Bug-octave
mailing list