From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15345 invoked by alias); 27 Jan 2015 11:15:50 -0000 Mailing-List: contact gcc-bugs-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-bugs-owner@gcc.gnu.org Received: (qmail 15028 invoked by uid 48); 27 Jan 2015 11:15:13 -0000 From: "rguenth at gcc dot gnu.org" To: gcc-bugs@gcc.gnu.org Subject: [Bug libstdc++/64535] Emergency buffer for exception allocation too small Date: Tue, 27 Jan 2015 11:15:00 -0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: gcc X-Bugzilla-Component: libstdc++ X-Bugzilla-Version: 5.0 X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: rguenth at gcc dot gnu.org X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P3 X-Bugzilla-Assigned-To: rguenth at gcc dot gnu.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: http://gcc.gnu.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-SW-Source: 2015-01/txt/msg03051.txt.bz2 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535 --- Comment #16 from Richard Biener --- (In reply to Jonathan Wakely from comment #15) > I think we need to get a suppression into valgrind: > > ==21268== Memcheck, a memory error detector > ==21268== Copyright (C) 2002-2013, and GNU GPL'd, by Julian Seward et al. > ==21268== Using Valgrind-3.9.0 and LibVEX; rerun with -h for copyright info > ==21268== Command: ./a.out > ==21268== > ==21268== > ==21268== HEAP SUMMARY: > ==21268== in use at exit: 72,704 bytes in 1 blocks > ==21268== total heap usage: 5,747 allocs, 5,746 frees, 822,784 bytes > allocated > ==21268== > ==21268== 72,704 bytes in 1 blocks are still reachable in loss record 1 of 1 > ==21268== at 0x4A0645D: malloc (vg_replace_malloc.c:291) > ==21268== by 0x4C990FF: _GLOBAL__sub_I_eh_alloc.cc (eh_alloc.cc:117) > ==21268== by 0x394940F2D9: call_init.part.0 (dl-init.c:82) > ==21268== by 0x394940F3C2: _dl_init (dl-init.c:34) > ==21268== by 0x3949401229: ??? (in /usr/lib64/ld-2.18.so) > ==21268== > ==21268== LEAK SUMMARY: > ==21268== definitely lost: 0 bytes in 0 blocks > ==21268== indirectly lost: 0 bytes in 0 blocks > ==21268== possibly lost: 0 bytes in 0 blocks > ==21268== still reachable: 72,704 bytes in 1 blocks > ==21268== suppressed: 0 bytes in 0 blocks > ==21268== > ==21268== For counts of detected and suppressed errors, rerun with: -v > ==21268== ERROR SUMMARY: 0 errors from 0 contexts (suppressed: 2 from 2) Or add a destructor. Index: libstdc++-v3/libsupc++/eh_alloc.cc =================================================================== --- libstdc++-v3/libsupc++/eh_alloc.cc (revision 220160) +++ libstdc++-v3/libsupc++/eh_alloc.cc (working copy) @@ -81,6 +81,7 @@ namespace { public: pool(); + ~pool(); void *allocate (std::size_t); void free (void *); @@ -240,6 +242,11 @@ namespace && p < arena + arena_size); } + pool::~pool () + { + free (arena); + } + pool emergency_pool; }