public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
From: "rguenth at gcc dot gnu.org" <gcc-bugzilla@gcc.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	[thread overview]
Message-ID: <bug-64535-4-NJuZqZLI1N@http.gcc.gnu.org/bugzilla/> (raw)
In-Reply-To: <bug-64535-4@http.gcc.gnu.org/bugzilla/>

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535

--- Comment #16 from Richard Biener <rguenth at gcc dot gnu.org> ---
(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;
 }


  parent reply	other threads:[~2015-01-27 11:15 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-08  9:43 [Bug libstdc++/64535] New: " rguenth at gcc dot gnu.org
2015-01-08 11:11 ` [Bug libstdc++/64535] " rguenth at gcc dot gnu.org
2015-01-08 11:27 ` rguenth at gcc dot gnu.org
2015-01-08 11:39 ` rguenth at gcc dot gnu.org
2015-01-08 11:57 ` rguenth at gcc dot gnu.org
2015-01-08 12:48 ` rguenth at gcc dot gnu.org
2015-01-09  8:44 ` jakub at gcc dot gnu.org
2015-01-09  9:01 ` rguenth at gcc dot gnu.org
2015-01-12 10:03 ` rguenth at gcc dot gnu.org
2015-01-12 10:19 ` rguenther at suse dot de
2015-01-12 14:11 ` rguenth at gcc dot gnu.org
2015-01-21 11:18 ` redi at gcc dot gnu.org
2015-01-22  9:22 ` rguenth at gcc dot gnu.org
2015-01-22  9:56 ` rguenth at gcc dot gnu.org
2015-01-26 22:36 ` redi at gcc dot gnu.org
2015-01-27 11:15 ` rguenth at gcc dot gnu.org [this message]
2015-01-27 11:22 ` redi at gcc dot gnu.org
2015-01-27 11:49 ` rguenther at suse dot de
2015-01-27 11:55 ` jakub at gcc dot gnu.org
2015-01-27 12:10 ` rguenther at suse dot de
2015-01-27 12:23 ` rguenth at gcc dot gnu.org
2015-01-27 12:30 ` jakub at gcc dot gnu.org
2015-01-27 12:34 ` rguenther at suse dot de
2015-01-27 12:39 ` jakub at gcc dot gnu.org
2015-01-27 12:45 ` redi at gcc dot gnu.org
2015-01-27 12:55 ` rguenther at suse dot de
2022-09-27 15:45 ` dumoulin.thibaut at gmail dot com
2022-09-27 16:05 ` redi at gcc dot gnu.org

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-64535-4-NJuZqZLI1N@http.gcc.gnu.org/bugzilla/ \
    --to=gcc-bugzilla@gcc.gnu.org \
    --cc=gcc-bugs@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).