Subject: Re: Octave 2.1.64 configured "--enable-shared" segfaults on startup From: Julius Smith To: bug-octave at bevo dot che dot wisc dot edu Date: Fri, 31 Dec 2004 15:00:07 -0600 I took some measures to cool down my machine, and I no longer get compiler crashes. However, I do repeatedly get the same crash in libc when I start octave 2.1.64 after building it with shared library support (see stack trace below). It works fine when compiled for static libraries. To test the possibility that my machine remains corrupted in some way, I rolled back to octave-2.1.57, and it works fine! Thus, the 2.1.64 crash is repeatable, while 2.1.57 does not crash at all. I'll next try 2.1.64 another Red Hat 9 machine with (supposedly) the same system. - jos > uname -a Linux adsl-63-195-51-145.dsl.snfc21.pacbell.net 2.4.26-1.ll.rh90.ccrma #1 Fri Apr 16 21:20:02 PDT 2004 i686 i686 i386 GNU/Linux > ./configure --enable-shared --disable-static ... Octave is now configured for i686-pc-linux-gnu Source directory: . Installation prefix: /usr/local C compiler: gcc -mieee-fp -Wall -W -Wshadow -g -O2 C++ compiler: g++ -mieee-fp -Wall -W -Wshadow -g -O2 Fortran compiler: g77 -O -mieee-fp Fortran libraries: -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2 -L/usr/lib/gcc-lib/i386-redhat-linux/3.2.2/../../.. -lfrtbegin -lg2c -lm -lgcc_s BLAS libraries: FFTW libraries: -lfftw3 HDF5 libraries: MPI libraries: LIBS: -lreadline -lncurses -ldl -lm Default pager: less gnuplot: gnuplot Do internal array bounds checking: false Build static libraries: false Build shared libraries: true Dynamic Linking: true (dlopen) Include support for GNU readline: true ... > gdb -q octave (gdb) r -q Starting program: /usr/local/bin/octave -q Program received signal SIGSEGV, Segmentation fault. 0x4161f6b2 in symbol_table::hash(std::string const&) (this=0x0, str=@0x0) at symtab.cc:1732 1732 return h & (table_size - 1); Current language: auto; currently c++ (gdb) bt #0 0x4161f6b2 in symbol_table::hash(std::string const&) (this=0x0, str=@0x0) at symtab.cc:1732 #1 0x4161a2a6 in symbol_table::lookup(std::string const&, bool, bool) ( this=0x0, nm=@0xbfffea10, insert=true, warn=false) at symtab.cc:719 #2 0x4156aa92 in install_dld_function(octave_value_list (*)(octave_value_list const&, int), std::string const&, octave_shlib const&, std::string const&, bool) (f=0x4156613c , name=@0xbfffea10, shl=@0xbfffeac0, doc=@0xbfffe9f0, is_text_fcn=false) at defun.cc:146 #3 0x41566022 in FSdispatch_gnu_v3 (shl=@0xbfffeac0) at stl_alloc.h:664 #4 0x401767eb in octave_dynamic_loader::do_load(std::string const&, std::string const&) (this=0x8a4c748, fcn_name=@0xbfffebe0, file_name=@0xbfffeba0) at dynamic-ld.cc:273 #5 0x40176b88 in octave_dynamic_loader::load(std::string const&, std::string const&) (fcn_name=@0xbfffebe0, file_name=@0xbfffeba0) at dynamic-ld.cc:308 #6 0x40264a73 in load_fcn_from_file(symbol_record*, bool) (sym_rec=0x8a42e98, exec_script=true) at parse.y:3553 #7 0x402bc126 in lookup(symbol_record*, bool) (sym_rec=0x8a42e98, exec_script=true) at variables.cc:824 #8 0x40409c31 in tree_identifier::do_lookup(bool&, bool) (this=0x8a429b0, script_file_executed=@0xf0bd3730, exec_script=true) at pt-id.cc:113 #9 0x4040a21b in tree_identifier::rvalue(int) (this=0x8a429b0, nargout=1) at pt-id.cc:159 #10 0x4040ab35 in tree_identifier::rvalue() (this=0x8a429b0) at pt-id.cc:202 #11 0x4040e4f1 in tree_index_expression::rvalue(int) (this=0x8a4c170, nargout=0) at pt-idx.cc:262 #12 0x4042da32 in tree_statement::eval(bool, int, bool) (this=0x8a4c658, silent=false, nargout=0, in_function_body=false) at oct-obj.h:78 #13 0x4042df34 in tree_statement_list::eval(bool, int) (this=0x8a4c1e8, silent=false, nargout=0) at oct-obj.h:78 #14 0x40263036 in parse_and_execute(_IO_FILE*) (f=0x8a3e2a0) at parse.y:3056 #15 0x402640de in parse_fcn_file (ff=@0xbffff230, exec_script=true, force_script=true) at parse.y:3520 #16 0x40264fea in source_file(std::string) (file_name= {static npos = 4294967295, _M_dataplus = {> = {}, _M_p = 0x8055f2c "/usr/local/share/octave/2.1.64/site/m/octave-forge/comm//PKG_ADD"}, static _S_empty_rep_storage = {0, 0, 16545, 0}}) at parse.y:3592 #17 0x40168ff4 in maybe_add_or_del_packages (a=@0xbffff3c0, b=@0xbffff3e0, script_file=@0xbffff3b0) at defaults.cc:141 #18 0x40169774 in execute_default_pkg_add_files() () at stl_alloc.h:664 #19 0x405e2944 in octave_main (argc=2, argv=0xbffff584, embedded=0) at octave.cc:536 #20 0x0804870b in main (argc=2, argv=0xbffff584) at main.c:35 #21 0x410a7a67 in __libc_start_main () from /lib/i686/libc.so.6 ------------------------------------------------------------- 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 -------------------------------------------------------------