From bug-octave-request at bevo dot che dot wisc dot edu Thu Jan 20 12:31:21 2000 Subject: seg fault in bleeding edge source From: A Scott Hodel To: bug-octave at bevo dot che dot wisc dot edu Cc: hodel at edalf1 dot msfc dot nasa dot gov Date: Thu, 20 Jan 2000 12:31:18 -0600 (CST) Bug report for Octave 2.1.24 configured for alphaev56-dec-osf4.0e Description: ----------- Trying to isolate problem while working on semidefinite programming package sp.oct (adapted from code by Vandeberghe and Boyd). Lines with >> at the front are my comments. I welcome any suggestions on how to track down bigMmsg = back from sp >> debugging message in an m-file which indicates that I've exited the >> sp.oct function. Just for safety, I had the function print its values >> before it returned, e.g. >> ColumnVector xx = x0; >> ... >> retval(0) = xx; >> #ifdef DEBUG >> cout << "retval(0) = xx=" << xx << endl; >> #endif Program received signal SIGSEGV, Segmentation fault 0x3ffbff9c434 in tree_multi_assignment::rvalue (this=0x140280660) at pt-assign.cc:236 236 octave_lvalue ult = lhs_elt->lvalue (); (gdb) print n_out No symbol "n_out" in current context. (gdb) print lhs->length() $1 = 5 (gdb) print p $2 = (void *) 0x140281ca0 (gdb) print n $3 = 5 (gdb) print k $4 = 1 >> Corresponding lines from pt-assign.cc: >> int n = rhs_val.length (); >> >> retval.resize (n, octave_value ()); >> >> for (Pix p = lhs->first (); p != 0; lhs->next (p)) >> { >> tree_expression *lhs_elt = lhs->operator () (p); >> >> if (lhs_elt) >> { >>[line 236] octave_lvalue ult = lhs_elt->lvalue (); >> >> Argument 1 (2nd returned argument) is declared as a ColumnVector and >> is returned by sp with >> >> retval(1) = ZZ; >> #ifdef DEBUG >> cout << "retval(1) = ZZ = " << endl; >> octave_print_internal(cout, retval(1).matrix_value() , 0); >> cout << endl; >> #endif (gdb) backtrace #0 0x3ffbff9c434 in tree_multi_assignment::rvalue (this=0x14027fe60) at pt-assign.cc:236 #1 0x3ffbffbd700 in tree_statement::eval (this=0x140287180, silent=false, nargout=0, in_function_body=false) at pt-stmt.cc:123 #2 0x3ffbffbda74 in tree_statement_list::eval (this=0x14025ad60, silent=false, nargout=0) at pt-stmt.cc:156 #3 0x3ffbff0b380 in parse_and_execute (f=0x11fffee98) at parse.y:2636 #4 0x3ffbff0cf94 in parse_fcn_file (ff= at 0x11fffef88, exec_script=true, force_script=false) at parse.y:3034 #5 0x3ffbff0d35c in load_fcn_from_file (sym_rec=0xfffffffffffffffc, exec_script=true) at parse.y:3071 #6 0x3ffbff41754 in lookup (sym_rec=0x1401e01c0, exec_script=true) at variables.cc:572 #7 0x3ffbffa4ff8 in tree_identifier::do_lookup (this=0x1401dab00, script_file_executed= at 0x11ffff0e0, exec_script=true) at pt-id.cc:112 #8 0x3ffbffa524c in tree_identifier::rvalue (this=0x1401dab00, nargout=0) at pt-id.cc:148 #9 0x3ffbffbd700 in tree_statement::eval (this=0x14002cda0, silent=false, nargout=0, in_function_body=false) at pt-stmt.cc:123 #10 0x3ffbffbda74 in tree_statement_list::eval (this=0x1401dab40, silent=false, nargout=0) at pt-stmt.cc:156 #11 0x3ffbff3021c in main_loop () at toplev.cc:125 #12 0x120018400 in main (argc=1, argv=0x11ffff388) at octave.cc:586 Repeat-By: --------- * Please replace this item with a description of the sequence of events that causes the problem to occur. Fix: --- * If possible, replace this item with a description of how to fix the problem (if you don't have a fix for the problem, don't include this section, but please do submit your report anyway). Configuration (please do not edit this section): ----------------------------------------------- uname output: OSF1 edalf1 V4.0 1091 alpha configure opts: --prefix=/usr/local/gnu/beta --with-f77 --enable-shared --enable-dl --enable-lite-kernel Fortran compiler: f77 FFLAGS: -fpe1 -O F2C: F2CFLAGS: FLIBS: -lUfor -lfor -lFutil -lm -lots -lm CPPFLAGS: INCFLAGS: -I/usr/local/gnu/beta/include/octave-2.1.24/octave -I/usr/local/gnu/beta/include C compiler: gcc, version 2.8.1 CFLAGS: -DHAVE_CONFIG_H -mieee-with-inexact -O -I/usr/local/gnu/beta/include -L/usr/local/gnu/beta/lib CPICFLAG: C++ compiler: c++, version 2.8.1 CXXFLAGS: -DHAVE_CONFIG_H -mieee-with-inexact -fno-rtti -fno-exceptions -fno-implicit-templates -g -O2 -Wall CXXPICFLAG: LDFLAGS: -g LIBFLAGS: -L/usr/local/gnu/beta/lib/octave-2.1.24 RLD_FLAG: -Xlinker -rpath -Xlinker /usr/local/gnu/beta/lib/octave-2.1.24 TERMLIBS: -lcurses LIBS: LEXLIB: LIBPLPLOT: LIBDLFCN: LIBGLOB: ./glob/libglob.a DEFS: -DOCTAVE_SOURCE=1 -DSEPCHAR=':' -DSEPCHAR_STR=":" -DUSE_READLINE=1 -D__NO_MATH_INLINES=1 -DCXX_NEW_FRIEND_TEMPLATE_DECL=1 -DHAVE_LIBM=1 -DF77_APPEND_UNDERSCORE=1 -DOCTAVE_LITE=1 -DSIZEOF_SHORT=2 -DSIZEOF_INT=4 -DSIZEOF_LONG=8 -DHAVE_ALLOCA_H=1 -DHAVE_ALLOCA=1 -DNPOS=string::npos -DSTDC_HEADERS=1 -DHAVE_DIRENT_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_SYS_WAIT_H=1 -DHAVE_ASSERT_H=1 -DHAVE_CURSES_H=1 -DHAVE_DLFCN_H=1 -DHAVE_FCNTL_H=1 -DHAVE_FLOAT_H=1 -DHAVE_FNMATCH_H=1 -DHAVE_GLOB_H=1 -DHAVE_GRP_H=1 -DHAVE_LIMITS_H=1 -DHAVE_MEMORY_H=1 -DHAVE_NAN_H=1 -DHAVE_POLL_H=1 -DHAVE_PWD_H=1 -DHAVE_SGTTY_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_SYS_POLL_H=1 -DHAVE_SYS_RESOURCE_H=1 -DHAVE_SYS_SELECT_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_SYS_TIME_H=1 -DHAVE_SYS_TIMES_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_UTSNAME_H=1 -DHAVE_TERMIO_H=1 -DHAVE_UNISTD_H=1 -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VE_FINITE=1 -DHAVE_ISNAN=1 -DHAVE_ACOSH=1 -DHAVE_ASINH=1 -DHAVE_ATANH=1 -DHAVE_ERF=1 -DHAVE_ERFC=1 -DHAVE_ST_BLKSIZE=1 -DHAVE_ST_BLOCKS=1 -DHAVE_ST_RDEV=1 -DHAVE_TM_ZONE=1 -DHAVE_GR_PASSWD=1 -DEXCEPTION_IN_MATH=1 -DRETSIGTYPE=void -DHAVE_SYS_SIGLIST=1 -DHAVE_POSIX_SIGNALS=1 -DHAVE_GETRUSAGE=1 -DHAVE_TIMES=1 -DGNUPLOT_HAS_MULTIPLOT=1 -DGNUPLOT_HAS_FRAMES=1 ----------------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.che.wisc.edu/octave/octave.html How to fund new projects: http://www.che.wisc.edu/octave/funding.html Subscription information: http://www.che.wisc.edu/octave/archive.html -----------------------------------------------------------------------