octave-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Octave-bug-tracker] [bug #40231] Memory leak in eval


From: Rik
Subject: [Octave-bug-tracker] [bug #40231] Memory leak in eval
Date: Thu, 10 Oct 2013 19:43:31 +0000
User-agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0

Follow-up Comment #2, bug #40231 (project octave):

I got the whole ginormous report after running the test suite under valgrind
so I don't have a clear idea which test caused the failure.  I seem to
remember that switch statements were a problem (see bug #35154).

I just tried the demo code there


eval("switch 1 default 1; endswitch")


and I get a memory leak in eval shown below.


==32481== 106 (56 direct, 50 indirect) bytes in 1 blocks are definitely lost
in loss record 453 of 579
==32481==    at 0x4C2B1C7: operator new(unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==32481==    by 0x5C98DAC: octave_base_parser::make_constant(int, token*)
(oct-parse.yy:1908)
==32481==    by 0x5C91D34: octave_push_parse(octave_pstate*, int, YYSTYPE
const*, octave_base_parser&) (oct-parse.yy:413)
==32481==    by 0x5C90D7E: octave_pull_parse(octave_pstate*,
octave_base_parser&) (oct-parse.cc:2155)
==32481==    by 0x5C90CFB: octave_parse(octave_base_parser&)
(oct-parse.cc:2123)
==32481==    by 0x5C9C657: octave_parser::run() (oct-parse.yy:3291)
==32481==    by 0x5C9FD3C: eval_string(std::string const&, bool, int&, int)
(oct-parse.yy:4140)
==32481==    by 0x5CA021A: eval_string(octave_value const&, bool, int&, int)
(oct-parse.yy:4225)
==32481==    by 0x5CA037D: Feval(octave_value_list const&, int)
(oct-parse.yy:4289)
==32481==    by 0x5B3F1C0: octave_builtin::do_multi_index_op(int,
octave_value_list const&, std::list<octave_lvalue,
std::allocator<octave_lvalue> > const*) (ov-builtin.cc:131)
==32481==    by 0x5B3EE67: octave_builtin::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int,
std::list<octave_lvalue, std::allocator<octave_lvalue> > const*)
(ov-builtin.cc:64)
==32481==    by 0x5B3ED55: octave_builtin::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int)
(ov-builtin.cc:47)
==32481==    by 0x5BF4F0B: octave_value::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int)
(ov.cc:1269)
==32481==    by 0x5BF4FB3: octave_value::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int,
std::list<octave_lvalue, std::allocator<octave_lvalue> > const*) (ov.cc:1280)
==32481==    by 0x5C5DAC2: tree_index_expression::rvalue(int,
std::list<octave_lvalue, std::allocator<octave_lvalue> > const*)
(pt-idx.cc:414)
==32481==    by 0x5C5D21A: tree_index_expression::rvalue(int) (pt-idx.cc:284)
==32481==    by 0x5C5DD19: tree_index_expression::rvalue1(int)
(pt-idx.cc:425)
==32481==    by 0x5C57346: tree_evaluator::visit_statement(tree_statement&)
(pt-eval.cc:747)
==32481==    by 0x5C77B6F: tree_statement::accept(tree_walker&)
(pt-stmt.cc:178)
==32481==    by 0x5C575B1:
tree_evaluator::visit_statement_list(tree_statement_list&) (pt-eval.cc:797)
==32481==    by 0x5C7818F: tree_statement_list::accept(tree_walker&)
(pt-stmt.cc:291)
==32481==    by 0x6071C0D: main_loop() (toplev.cc:573)
==32481==    by 0x57CA2C3: octave_execute_interpreter (octave.cc:1031)
==32481==    by 0x402CA0: main (main.cc:49)




    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?40231>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]