[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Problem with octave oregonator.oct example: Octave, version 2.1.39 under
From: |
John W. Eaton |
Subject: |
Problem with octave oregonator.oct example: Octave, version 2.1.39 under SuSE 7.3/gcc version 2.95.3 |
Date: |
Thu, 21 Nov 2002 09:21:01 -0600 |
On 21-Nov-2002, Johann Drexl <address@hidden> wrote:
| Hello,
|
| I'm trying to compile he oregonator.oct -Example in Octave.
| I'm using Octave, version 2.1.39 under SuSE 7.3/gcc version 2.95.3 .
|
| I compiled Octave using configuration with
| ./configure --enable-shared
| to enable the use of shared libraries.
|
| I can compile the hello.cc example with:
| mkoctfile hello.cc
| and generate the hello.oct File.
| This runs nicely in octave:
| octave:1> hello
| Hello, world!
|
| But when I try the same for the oregonator.oct example octave crashes:
| octave:2> oregonator
| panic: Segmentation fault -- stopping myself...
| attempting to save variables to `octave-core'...
| save to `octave-core' complete
| Segmentation fault
|
|
| I also tried compiling with the option
| mkoctfile -DHAVE_OCTAVE_21 -s -v oregonator.cc
| but the result is the same.
|
| Any idea on this?
This is a demonstration of what happens if you are sloppy and write
dynamically linked files that don't check their inputs to ensure that
they are valid. :-)
The oregonator function requires some inputs but doesn't check to see
whether they are provided, then proceeds to access array elements that
don't exist, and then it crashes Octave.
Try
oregonator ([1, 2, 3], 0)
instead.
jwe
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------