octave-3.0.3 crashes while executing 'expfit' ("free(): invalid pointer")
Sergei Steshenko
sergstesh at yahoo.com
Sun Dec 28 13:55:48 CST 2008
--- On Sun, 12/28/08, Thomas Weber <thomas.weber.mail at gmail.com> wrote:
> From: Thomas Weber <thomas.weber.mail at gmail.com>
> Subject: Re: octave-3.0.3 crashes while executing 'expfit' ("free(): invalid pointer")
> To: "Sergei Steshenko" <sergstesh at yahoo.com>
> Cc: "John W. Eaton" <jwe at octave.org>, bug-octave at octave.org
> Date: Sunday, December 28, 2008, 11:28 AM
> On Thu, Dec 25, 2008 at 08:48:22AM -0800, Sergei Steshenko
> wrote:
> > --- On Thu, 12/25/08, Thomas Weber
> <thomas.weber.mail at gmail.com> wrote:
> >
> > > From: Thomas Weber
> <thomas.weber.mail at gmail.com>
> > > Subject: Re: octave-3.0.3 crashes while executing
> 'expfit' ("free(): invalid pointer")
> > > To: "Sergei Steshenko"
> <sergstesh at yahoo.com>
> > > Cc: "John W. Eaton"
> <jwe at octave.org>, bug-octave at octave.org
> > > Date: Thursday, December 25, 2008, 8:12 AM
> > > On Wed, Dec 24, 2008 at 05:28:22PM -0800, Sergei
> Steshenko
> > > wrote:
> > > > My wild guess there is
> 'new'/'malloc'
> > > somewhere which doesn't check pointer
> > > > for NULL; on a 64 bits system memory
> allocation error
> > > is less likely than
> > > > on a 32 bits system.
> > > >
> > > > The wild guess is based on the fact that
> peak memory
> > > consumption is about
> > > > 2G.
> > >
> > > What's your system's memory configuration
> (ie, how
> > > much)? RAM and Swap,
> > > please.
> > >
> > > Thanks
> > > Thomas
> >
> > 2G of RAM + 4G of swap:
>
> According to valgrind, new() throws an exception:
> ================================================================================
> **12906** new/new[] failed and should throw an exception,
> but Valgrind
> cannot throw exceptions and so is aborting instead.
> Sorry.
> ==12906== at 0x4021881: VALGRIND_PRINTF_BACKTRACE
> (valgrind.h:3695)
> ==12906== by 0x4023101: operator new[](unsigned)
> (vg_replace_malloc.c:268)
> ==12906== by 0x43BF769:
> Array<std::complex<double> >::Array(dim_vector
> const&) (Array.h:70)
> ==12906== by 0x43BACA0: elem_xpow(ComplexNDArray
> const&, NDArray const&) (ArrayN.h:59)
> ==12906== by 0x456AC85:
> _ZL16oct_binop_el_powRK17octave_base_valueS1_
> (op-cm-m.cc:90)
> ==12906== by 0x44253B1:
> do_binary_op(octave_value::binary_op, octave_value
> const&, octave_value const&) (ov.cc:1376)
> ==12906== by 0x45268AA: tree_binary_expression::rvalue()
> (pt-binop.cc:75)
> ==12906== by 0x4523CDA: tree_simple_assignment::rvalue()
> (pt-assign.cc:202)
> ==12906== by 0x4521C4F:
> tree_simple_assignment::rvalue(int) (pt-assign.cc:184)
> ==12906== by 0x455C2A9: tree_statement::eval(bool, int,
> bool) (pt-stmt.cc:133)
> ==12906== by 0x455C4C7: tree_statement_list::eval(bool,
> int) (pt-stmt.cc:190)
> ==12906== by 0x44671C7:
> octave_user_function::do_multi_index_op(int,
> octave_value_list const&) (ov-usr-fcn.cc:366)
> ==12906== by 0x4466276:
> octave_user_function::subsref(std::string const&,
> std::list<octave_value_list,
> std::allocator<octave_value_list> > const&,
> int) (ov-usr-fcn.cc:220)
> ==12906== by 0x4421DFA:
> octave_value::subsref(std::string const&,
> std::list<octave_value_list,
> std::allocator<octave_value_list> > const&,
> int) (ov.cc:783)
> ==12906== by 0x453BC3C:
> tree_index_expression::rvalue(int) (pt-idx.cc:352)
> ==12906== by 0x452259B:
> tree_multi_assignment::rvalue(int) (pt-assign.cc:362)
> ==12906== by 0x455C2A9: tree_statement::eval(bool, int,
> bool) (pt-stmt.cc:133)
> ==12906== by 0x455C4C7: tree_statement_list::eval(bool,
> int) (pt-stmt.cc:190)
> ==12906== by 0x43476AE: parse_and_execute(_IO_FILE*)
> (parse.y:2875)
> ==12906== by 0x434803E: _ZL14parse_fcn_fileRKSsbb
> (parse.y:3347)
> ==12906== by 0x4348E19: load_fcn_from_file(std::string
> const&, bool) (parse.y:3469)
> ==12906== by 0x43490B3:
> load_fcn_from_file(symbol_record*, bool) (parse.y:3491)
> ==12906== by 0x43A6C7A: lookup(symbol_record*, bool)
> (variables.cc:1121)
> ==12906== by 0x45377FF:
> tree_identifier::do_lookup(bool&, bool) (pt-id.cc:110)
> ==12906== by 0x455C26E: tree_statement::eval(bool, int,
> bool) (pt-stmt.cc:124)
> ==12906== by 0x455C4C7: tree_statement_list::eval(bool,
> int) (pt-stmt.cc:190)
> ==12906== by 0x4398F5B: main_loop() (toplev.cc:225)
> ==12906== by 0x4332624: octave_main (octave.cc:835)
> ==12906== by 0x8048769: main (in /usr/bin/octave-3.0.1)
> ================================================================================
>
> I'm at a loss on how to proceed from here.
>
> Thomas
Should I understand this post of yours as a confirmation of the problem
I've reported ?
I also see this in your trace:
==12906== by 0x8048769: main (in /usr/bin/octave-3.0.1)
, so, I guess, you've been running 3.0.1 and not 3.0.3 like I have.
Thanks,
Sergei.
More information about the Bug-octave
mailing list