[Pkg-octave-devel] octave-3.0.0 crashes at startup on ARM

John W. Eaton jwe at bevo.che.wisc.edu
Thu Jan 10 08:53:17 UTC 2008


On 10-Jan-2008, Thomas Weber wrote:

| it seems Octave crashes at startup on the ARM Linux architecture (I
| can't use bug_report, as I don't have the hardware). I attach a
| backtrace provided by Soeren Sonnenburg:
| 
| ========================================================================
| OK, I've recompiled octave w/ -O2 -g and it dies on loading
| dispatch.oct. This could be enough info for upstream to fix it.
| 
| Program received signal SIGSEGV, Segmentation fault.
| [Switching to Thread 0x40022490 (LWP 11491)]
| 0x40db4890 in octave_shlib::make_shlib ()
|    from /usr/lib/octave-3.0.0/liboctave.so
| (gdb) bt
| #0  0x40db4890 in octave_shlib::make_shlib ()
|    from /usr/lib/octave-3.0.0/liboctave.so
| #1  0x401f7584 in octave_dynamic_loader::do_load_oct (
|     this=<value optimized out>, fcn_name=@0xbedd5664, file_name=@0xbedd5660, 
|     relative=false) at ../liboctave/oct-shlib.h:52

The last bits of this execution path are apparently

  octave_shlib (void) : relative (false), rep (make_shlib ()) { }

(line 52 in oct-shlib.h) which is calling make_shlib from
oct-shlib.cc:

  octave_shlib *
  octave_shlib::make_shlib (void)
  {
  #if defined (HAVE_DLOPEN_API)
    return new octave_dlopen_shlib ();
  #elif defined (HAVE_SHL_LOAD_API)
    return new octave_shl_load_shlib ();
  #elif defined (HAVE_LOADLIBRARY_API)
    return new octave_w32_shlib ();
  #elif defined (HAVE_DYLD_API)
    return new octave_dyld_shlib ();
  #else
    return new octave_base_shlib ();
  #endif
  }

>From the info above, it's not clear precisely which line is causing
the crash, but according to the build log linked here:

| Build logs of crashing build can be found at
| http://buildd.debian.org/fetch.cgi?pkg=octave3.0;ver=3.0.0-1;arch=arm;stamp=1199146040

it seems that HAVE_DLOPEN_API is defined, so it should be executing

  return new octave_dlopen_shlib ()

The octave_dlopen_shlib constructor is just

  octave_dlopen_shlib::octave_dlopen_shlib (void)
    : octave_base_shlib (), library (0)
  { }

in which the octave_base_shlib constructor is

  octave_base_shlib (void)
    : octave_shlib (octave_xshlib ()), file (), fcn_names (),
      tm_loaded (static_cast<time_t> (0))
  { count = 1; }

and library is a void pointer.  In the octave_base_shlib constructor,
octave_xshlib is a trivial class, file is a std::string object,
fcn_names is a string_vector object, and tm_loaded is an octave_time
object.  I'd guess you wouldn't get this far if those functions were
generally buggy.

I don't see anything obvious here that is a bug.  I think you'll need
to find precisely where the crash is happening and at a minimum,
examine the variables in that scope.

Have you tried building with -O0?  If that works but -O2 fails, then I
would start to suspect an ARM-specific compiler bug since compiling
with GCC and -O2 works on many other systems.

jwe




More information about the Pkg-octave-devel mailing list