public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libstdc++/27615] New: memory leak with libstdc++ set <string>
@ 2006-05-15 15:28 nanjiang dot shu at gmail dot com
2006-05-15 15:35 ` [Bug libstdc++/27615] " pinskia at gcc dot gnu dot org
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: nanjiang dot shu at gmail dot com @ 2006-05-15 15:28 UTC (permalink / raw)
To: gcc-bugs
I used set <string> ss
as a containtor for a list of unique, ordered strings. However, program
reports segmentation error when trying to allocate a block of memory.
I have used libcwd to debug the memory allocation, the libcwd detected
memory leaks:
+-----------------------------------------------------------------------------+
|MALLOC : operator new (size = 1088) = 0x83a2a18 |
|libstdc++.so.5:_ZNSt24__default_alloc_templateILb1ELi0EE14_S_chunk_allocEjRi]|
| * WARNING : Memory leak detected! |
| * 0x83a2a18 std::__default_alloc_template<true, |
| * 0>::_S_chunk_alloc(unsigned int, int&) <unknown type>; (sz |
| * = 1088) |
+-----------------------------------------------------------------------------+
Memory leak problem solved by changing
Set <string> ss ==> set <char*> ss
However, I'm not sure if this only solves the problem temporary, since
set <string> does not result in memory leaks in most cases.
Program was compiled by
g++ -g3 src.cpp -o prog -lm
~
--
Summary: memory leak with libstdc++ set <string>
Product: gcc
Version: 3.3.2
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: nanjiang dot shu at gmail dot com
GCC build triplet: i586-mandrake-linux-gnu
GCC host triplet: i686-mandrake-linux-gnu
GCC target triplet: i586-mandrake-linux-gnu
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27615
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/27615] memory leak with libstdc++ set <string>
2006-05-15 15:28 [Bug libstdc++/27615] New: memory leak with libstdc++ set <string> nanjiang dot shu at gmail dot com
@ 2006-05-15 15:35 ` pinskia at gcc dot gnu dot org
2006-05-15 15:50 ` nanjiang dot shu at gmail dot com
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-05-15 15:35 UTC (permalink / raw)
To: gcc-bugs
------- Comment #1 from pinskia at gcc dot gnu dot org 2006-05-15 15:35 -------
Can you try a newer GCC since 3.3.x (and 3.4.x) are no longer being updated.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27615
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/27615] memory leak with libstdc++ set <string>
2006-05-15 15:28 [Bug libstdc++/27615] New: memory leak with libstdc++ set <string> nanjiang dot shu at gmail dot com
2006-05-15 15:35 ` [Bug libstdc++/27615] " pinskia at gcc dot gnu dot org
@ 2006-05-15 15:50 ` nanjiang dot shu at gmail dot com
2006-05-15 16:47 ` pcarlini at suse dot de
2006-08-15 18:23 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: nanjiang dot shu at gmail dot com @ 2006-05-15 15:50 UTC (permalink / raw)
To: gcc-bugs
------- Comment #2 from nanjiang dot shu at gmail dot com 2006-05-15 15:50 -------
Subject: Re: memory leak with libstdc++ set <string>
I have compiled the problem with gcc4.1.0, which was builded under
linux-pc-i686 from tar balls. The program exited with similar error
message. But I did not debuged with libcwd then. Unforturnately, the
computer with gcc4.1.0 installed is down right now.
I guess the bug is still exist in gcc 4.1.0
/Nanjiang
On 15 May 2006 15:35:40 -0000, pinskia at gcc dot gnu dot org
<gcc-bugzilla@gcc.gnu.org> wrote:
>
>
> ------- Comment #1 from pinskia at gcc dot gnu dot org 2006-05-15 15:35 -------
> Can you try a newer GCC since 3.3.x (and 3.4.x) are no longer being updated.
>
>
> --
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27615
>
> ------- You are receiving this mail because: -------
> You reported the bug, or are watching the reporter.
>
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27615
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/27615] memory leak with libstdc++ set <string>
2006-05-15 15:28 [Bug libstdc++/27615] New: memory leak with libstdc++ set <string> nanjiang dot shu at gmail dot com
2006-05-15 15:35 ` [Bug libstdc++/27615] " pinskia at gcc dot gnu dot org
2006-05-15 15:50 ` nanjiang dot shu at gmail dot com
@ 2006-05-15 16:47 ` pcarlini at suse dot de
2006-08-15 18:23 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pcarlini at suse dot de @ 2006-05-15 16:47 UTC (permalink / raw)
To: gcc-bugs
------- Comment #3 from pcarlini at suse dot de 2006-05-15 16:46 -------
Missing a self-contained, simple testcase, certainly we cannot even imagine
debugging this... Also, please use valgrind, very reliable and commonly
available.
--
pcarlini at suse dot de changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27615
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug libstdc++/27615] memory leak with libstdc++ set <string>
2006-05-15 15:28 [Bug libstdc++/27615] New: memory leak with libstdc++ set <string> nanjiang dot shu at gmail dot com
` (2 preceding siblings ...)
2006-05-15 16:47 ` pcarlini at suse dot de
@ 2006-08-15 18:23 ` pinskia at gcc dot gnu dot org
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2006-08-15 18:23 UTC (permalink / raw)
To: gcc-bugs
------- Comment #4 from pinskia at gcc dot gnu dot org 2006-08-15 18:22 -------
No feedback in 3 months.
--
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |INVALID
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=27615
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2006-08-15 18:23 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2006-05-15 15:28 [Bug libstdc++/27615] New: memory leak with libstdc++ set <string> nanjiang dot shu at gmail dot com
2006-05-15 15:35 ` [Bug libstdc++/27615] " pinskia at gcc dot gnu dot org
2006-05-15 15:50 ` nanjiang dot shu at gmail dot com
2006-05-15 16:47 ` pcarlini at suse dot de
2006-08-15 18:23 ` pinskia at gcc dot gnu dot org
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).