From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9211 invoked by alias); 15 May 2006 15:28:45 -0000 Received: (qmail 9192 invoked by uid 48); 15 May 2006 15:28:38 -0000 Date: Mon, 15 May 2006 15:28:00 -0000 Subject: [Bug libstdc++/27615] New: memory leak with libstdc++ set X-Bugzilla-Reason: CC Message-ID: Reply-To: gcc-bugzilla@gcc.gnu.org To: gcc-bugs@gcc.gnu.org From: "nanjiang dot shu at gmail dot com" Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org X-SW-Source: 2006-05/txt/msg01462.txt.bz2 List-Id: I used set 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::_S_chunk_alloc(unsigned int, int&) ; (sz | | * = 1088) | +-----------------------------------------------------------------------------+ Memory leak problem solved by changing Set ss ==> set ss However, I'm not sure if this only solves the problem temporary, since set 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 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