[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Octave-bug-tracker] [bug #40232] Memory leak in string_vector::resize o
From: |
Rik |
Subject: |
[Octave-bug-tracker] [bug #40232] Memory leak in string_vector::resize or load_path::get_file_list |
Date: |
Thu, 10 Oct 2013 03:21:24 +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/?40232>
Summary: Memory leak in string_vector::resize or
load_path::get_file_list
Project: GNU Octave
Submitted by: rik5
Submitted on: Wed 09 Oct 2013 08:21:24 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 can't tell if the leak is in resize, or in load_path and the way it is using
resize. In the routine get_file_list() a string vector is first resized to
the largest possible number of elements and at the end of the routine it is
resized again to a smaller value. It is the second resize which is causing
the problem.
==16089== 200 bytes in 25 blocks are definitely lost in loss record 883 of
1,172
==16089== at 0x4C2AC27: operator new[](unsigned long) (in
/usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==16089== by 0x53F86D6: std::string* no_ctor_new<std::string>(unsigned
long) (oct-mem.h:131)
==16089== by 0x5757783: Array<std::string>::ArrayRep::ArrayRep(int)
(Array.h:80)
==16089== by 0x5756DDC: Array<std::string>::Array(dim_vector const&)
(Array.h:204)
==16089== by 0x69E3186: Array<std::string>::resize2(int, int, std::string
const&) (Array.cc:978)
==16089== by 0x69DCF9B: Array<std::string>::resize(dim_vector const&,
std::string const&) (Array.cc:1017)
==16089== by 0x53F31E6: string_vector::resize(int, std::string const&)
(str-vec.h:93)
==16089== by 0x5B2FDED: load_path::dir_info::get_file_list(std::string
const&) (load-path.cc:207)
==16089== by 0x5B2F880: load_path::dir_info::initialize()
(load-path.cc:126)
==16089== by 0x5B3905B: load_path::dir_info::dir_info(std::string const&)
(load-path.h:312)
==16089== by 0x5B31DCA: load_path::do_add(std::string const&, bool, bool)
(load-path.cc:696)
==16089== by 0x5B31ADC: load_path::do_append(std::string const&, bool)
(load-path.cc:643)
==16089== by 0x5B318AE: load_path::do_set(std::string const&, bool, bool)
(load-path.cc:622)
==16089== by 0x5B31409: load_path::do_initialize(bool) (load-path.cc:541)
==16089== by 0x53F4F33: load_path::initialize(bool) (load-path.h:54)
==16089== by 0x53F2167: octave_initialize_interpreter (octave.cc:950)
==16089== by 0x402AC3: main (main-cli.cc:40)
==16089==
_______________________________________________________
Reply to this item at:
<http://savannah.gnu.org/bugs/?40232>
_______________________________________________
Message sent via/by Savannah
http://savannah.gnu.org/
- [Octave-bug-tracker] [bug #40232] Memory leak in string_vector::resize or load_path::get_file_list,
Rik <=