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

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

[Octave-bug-tracker] [bug #40230] Memory leak in putenv


From: Rik
Subject: [Octave-bug-tracker] [bug #40230] Memory leak in putenv
Date: Thu, 10 Oct 2013 02:48:09 +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/?40230>

                 Summary: Memory leak in putenv
                 Project: GNU Octave
            Submitted by: rik5
            Submitted on: Wed 09 Oct 2013 07:48:08 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:

The following Octave code:


putenv ("AB", "C")


produces the following leak report.  I've verified that the loss is always the
C-terminated strings "VAR" and "VAL" which are the inputs to putenv.  When it
is not a trivial example, such as when EXEC_PATH is set, the loss is more like
700 bytes.


==327== 5 bytes in 1 blocks are definitely lost in loss record 5 of 569
==327==    at 0x4C2B6CD: malloc (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==327==    by 0x6F089CA: octave_putenv(std::string const&, std::string const&)
(lo-utils.cc:101)
==327==    by 0x6EF9206: octave_env::putenv(std::string const&, std::string
const&) (oct-env.cc:201)
==327==    by 0x5C63293: Fputenv(octave_value_list const&, int)
(sysdep.cc:597)
==327==    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)
==327==    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)
==327==    by 0x5766F45: octave_builtin::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int)
(ov-builtin.cc:47)
==327==    by 0x580DBC7: octave_value::subsref(std::string const&,
std::list<octave_value_list, std::allocator<octave_value_list> > const&, int)
(ov.cc:1269)
==327==    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)
==327==    by 0x587696E: tree_index_expression::rvalue(int,
std::list<octave_lvalue, std::allocator<octave_lvalue> > const*)
(pt-idx.cc:414)
==327==    by 0x58760C6: tree_index_expression::rvalue(int) (pt-idx.cc:284)
==327==    by 0x5876BC5: tree_index_expression::rvalue1(int) (pt-idx.cc:425)
==327==    by 0x587016A: tree_evaluator::visit_statement(tree_statement&)
(pt-eval.cc:747)
==327==    by 0x5890AD3: tree_statement::accept(tree_walker&)
(pt-stmt.cc:178)
==327==    by 0x58703D5:
tree_evaluator::visit_statement_list(tree_statement_list&) (pt-eval.cc:797)
==327==    by 0x58910F3: tree_statement_list::accept(tree_walker&)
(pt-stmt.cc:291)
==327==    by 0x5C8B1F1: main_loop() (toplev.cc:573)
==327==    by 0x53F24B3: octave_execute_interpreter (octave.cc:1031)
==327==    by 0x402AC8: main (main-cli.cc:42)







    _______________________________________________________

Reply to this item at:

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

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




reply via email to

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