public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c++/12487] New: memory leaks with 'class X { std::list<X> t; };'
@ 2003-10-02 0:55 ant_diaz at teleline dot es
2003-10-02 1:37 ` [Bug libstdc++/12487] " pinskia at gcc dot gnu dot org
0 siblings, 1 reply; 2+ messages in thread
From: ant_diaz at teleline dot es @ 2003-10-02 0:55 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12487
Summary: memory leaks with 'class X { std::list<X> t; };'
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: critical
Priority: P1
Component: c++
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: ant_diaz at teleline dot es
CC: gcc-bugs at gcc dot gnu dot org
GCC build triplet: i586-linux-gnu
GCC host triplet: i586-linux-gnu
GCC target triplet: i586-linux-gnu
The following example compiles without problem with g++ 3.3.1 (glibc 2.3.1). But
the produced executable runs out of memory in no time.
g++ -Wall -W -o test main.cc
./test
Out of memory
g++ -v
Reading specs from /usr/local/lib/gcc-lib/i586-pc-linux-gnu/3.3.1/specs
Configured with: ../gcc-3.3.1/configure --enable-languages=c,c++ --disable-nls
Thread model: posix
gcc version 3.3.1
Doesn't occur if:
replacing 'list' with 'vector'
using g++ 3.2.2 (glibc 2.3.1)
using egcs 1.1.2 (glibc 2.1)
-------- EXAMPLE BEGINS -------
#include <list>
class X { std::list<X> t; };
void f1() { X x; };
int main()
{
while( true ) f1();
return 0;
}
------- EXAMPLE ENDS -------
^ permalink raw reply [flat|nested] 2+ messages in thread
* [Bug libstdc++/12487] memory leaks with 'class X { std::list<X> t; };'
2003-10-02 0:55 [Bug c++/12487] New: memory leaks with 'class X { std::list<X> t; };' ant_diaz at teleline dot es
@ 2003-10-02 1:37 ` pinskia at gcc dot gnu dot org
0 siblings, 0 replies; 2+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2003-10-02 1:37 UTC (permalink / raw)
To: gcc-bugs
PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=12487
pinskia at gcc dot gnu dot org changed:
What |Removed |Added
----------------------------------------------------------------------------
Severity|critical |normal
Status|UNCONFIRMED |RESOLVED
Component|c++ |libstdc++
Resolution| |FIXED
Target Milestone|--- |3.4
------- Additional Comments From pinskia at gcc dot gnu dot org 2003-10-02 01:37 -------
This is fixed on the mainline at least, I do not know if this is fixed on the 3.3 branch though.
But really this is not considered a bug, see <http://gcc.gnu.org/ml/libstdc++/2002-10/
msg00044.html>.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-10-02 1:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-02 0:55 [Bug c++/12487] New: memory leaks with 'class X { std::list<X> t; };' ant_diaz at teleline dot es
2003-10-02 1:37 ` [Bug libstdc++/12487] " 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).