[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40228] Memory leak in octave_base64_encode
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #40228] Memory leak in octave_base64_encode |
Date: |
Thu, 10 Oct 2013 02:21:15 +0000 |
User-agent: |
Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:24.0) Gecko/20100101 Firefox/24.0 |
URL:
<http://savannah.gnu.org/bugs/?40228>
Summary: Memory leak in octave_base64_encode
Project: GNU Octave
Submitted by: rik5
Submitted on: Wed 09 Oct 2013 07:21:14 PM PDT
Category: Interpreter
Severity: 3 - Normal
Priority: 5 - Normal
Item Group: Other
Status: None
Assigned to: None
Originator Name:
Originator Email:
Open/Closed: Open
Discussion Lock: Any
Release: dev
Operating System: GNU/Linux
_______________________________________________________
Details:
I ran the test suite under valgrind and this leak showed up. base64.c is from
gnulib, so Octave is probably not managing the interaction between C++
(Octave) and C (gnulib) correctly.
==16089== 2,138 bytes in 2 blocks are definitely lost in loss record 1,096 of
1,172
==16089== at 0x4C2B6CD: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16089== by 0x6F3B4E9: base64_encode_alloc (base64.c:136)
==16089== by 0x6F09D6E: octave_base64_encode(char const*, unsigned long,
char**) (oct-base64.cc:39)
==16089== by 0x5945DD8: Fbase64_encode(octave_value_list const&, int)
(data.cc:7384)
==16089== by 0x57673B0: octave_builtin::do_multi_index_op(int,
octave_value_list const&, std::list<octave_lvalue,
std::allocator<octave_lvalue> > const*) (ov-builtin.cc:131)
==16089== by 0x5767057: 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)
==16089== by 0x5766F45: octave_builtin::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int)
(ov-builtin.cc:47)
==16089== by 0x5767EA6: octave_builtin::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&)
(ov-builtin.h:62)
==16089== by 0x580DB74: octave_value::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int)
(ov.cc:1267)
==16089== by 0x580DC6F: 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)
==16089== by 0x587696E: tree_index_expression::rvalue(int,
std::list<octave_lvalue, std::allocator<octave_lvalue> > const*)
(pt-idx.cc:414)
==16089== by 0x58760C6: tree_index_expression::rvalue(int) (pt-idx.cc:284)
==16089== by 0x5876BC5: tree_index_expression::rvalue1(int)
(pt-idx.cc:425)
==16089== by 0x5862A99:
tree_argument_list::convert_to_const_vector(octave_value const*)
(pt-arg-list.cc:224)
==16089== by 0x58762CC: tree_index_expression::rvalue(int,
std::list<octave_lvalue, std::allocator<octave_lvalue> > const*)
(pt-idx.cc:315)
==16089== by 0x58760C6: tree_index_expression::rvalue(int) (pt-idx.cc:284)
==16089== by 0x5876BC5: tree_index_expression::rvalue1(int)
(pt-idx.cc:425)
==16089== by 0x5864DE7: tree_simple_assignment::rvalue1(int)
(pt-assign.cc:84)
==16089== by 0x587016A: tree_evaluator::visit_statement(tree_statement&)
(pt-eval.cc:747)
==16089== by 0x5890AD3: tree_statement::accept(tree_walker&)
(pt-stmt.cc:178)
==16089== by 0x58703D5:
tree_evaluator::visit_statement_list(tree_statement_list&) (pt-eval.cc:797)
==16089== by 0x58910F3: tree_statement_list::accept(tree_walker&)
(pt-stmt.cc:291)
==16089== by 0x58033B6: octave_user_function::do_multi_index_op(int,
octave_value_list const&, std::list<octave_lvalue,
std::allocator<octave_lvalue> > const*) (ov-usr-fcn.cc:588)
==16089== by 0x5802CA5: octave_user_function::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-usr-fcn.cc:437)
==16089== by 0x580DC4F: 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:1278)
==16089== by 0x587696E: tree_index_expression::rvalue(int,
std::list<octave_lvalue, std::allocator<octave_lvalue> > const*)
(pt-idx.cc:414)
==16089== by 0x586562C: tree_multi_assignment::rvalue(int)
(pt-assign.cc:230)
==16089== by 0x58B883E: eval_string(std::string const&, bool, int&, int)
(oct-parse.yy:4126)
==16089== by 0x58B8B9E: eval_string(octave_value const&, bool, int&, int)
(oct-parse.yy:4179)
==16089== by 0x58B8D01: Feval(octave_value_list const&, int)
(oct-parse.yy:4243)
==16089== by 0x57673B0: octave_builtin::do_multi_index_op(int,
octave_value_list const&, std::list<octave_lvalue,
std::allocator<octave_lvalue> > const*) (ov-builtin.cc:131)
==16089== by 0x5767057: 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)
==16089== by 0x5766F45: octave_builtin::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int)
(ov-builtin.cc:47)
==16089== by 0x580DBC7: octave_value::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int)
(ov.cc:1269)
==16089== by 0x580DC6F: 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)
==16089== by 0x587696E: tree_index_expression::rvalue(int,
std::list<octave_lvalue, std::allocator<octave_lvalue> > const*)
(pt-idx.cc:414)
==16089== by 0x58760C6: tree_index_expression::rvalue(int) (pt-idx.cc:284)
==16089== by 0x5876BC5: tree_index_expression::rvalue1(int)
(pt-idx.cc:425)
==16089== by 0x587016A: tree_evaluator::visit_statement(tree_statement&)
(pt-eval.cc:747)
==16089== by 0x5890AD3: tree_statement::accept(tree_walker&)
(pt-stmt.cc:178)
==16089== by 0x58703D5:
tree_evaluator::visit_statement_list(tree_statement_list&) (pt-eval.cc:797)
==16089== by 0x58910F3: tree_statement_list::accept(tree_walker&)
(pt-stmt.cc:291)
==16089== by 0x586FBE4:
tree_evaluator::visit_if_command_list(tree_if_command_list&) (pt-eval.cc:588)
==16089== by 0x588E80F: tree_if_command_list::accept(tree_walker&)
(pt-select.cc:83)
==16089== by 0x586FA77: tree_evaluator::visit_if_command(tree_if_command&)
(pt-eval.cc:563)
==16089== by 0x588EA2B: tree_if_command::accept(tree_walker&)
(pt-select.cc:108)
==16089== by 0x5870083: tree_evaluator::visit_statement(tree_statement&)
(pt-eval.cc:721)
==16089== by 0x5890AD3: tree_statement::accept(tree_walker&)
(pt-stmt.cc:178)
==16089== by 0x58703D5:
tree_evaluator::visit_statement_list(tree_statement_list&) (pt-eval.cc:797)
==16089== by 0x58910F3: tree_statement_list::accept(tree_walker&)
(pt-stmt.cc:291)
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40228>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #40228] Memory leak in octave_base64_encode,
Rik <=