This is the mail archive of the
libstdc++@gcc.gnu.org
mailing list for the libstdc++ project.
Re: [patch] libstdc++/69945 Add __gnu_cxx::__freeres hook
- From: Mark Wielaard <mjw at redhat dot com>
- To: Jonathan Wakely <jwakely at redhat dot com>
- Cc: libstdc++ at gcc dot gnu dot org, gcc-patches at gcc dot gnu dot org, Ivo Raisr <ivosh at ivosh dot net>
- Date: Wed, 16 Mar 2016 16:29:18 +0100
- Subject: Re: [patch] libstdc++/69945 Add __gnu_cxx::__freeres hook
- Authentication-results: sourceware.org; auth=none
- References: <20160224183558 dot GF4664 at redhat dot com> <1457019271 dot 7770 dot 325 dot camel at redhat dot com>
On Thu, 2016-03-03 at 16:34 +0100, Mark Wielaard wrote:
> On Wed, 2016-02-24 at 18:35 +0000, Jonathan Wakely wrote:
> > This adds a new function to libsupc++ which will free the memory still
> > in use by the pool used for allocating exceptions when malloc fails.
> >
> > This is similar to glibc's __libc_freeres, which valgrind (and other
> > tools?) use to tell glibc to deallocate everything before exiting.
> >
> > I initially called it __gnu_cxx::__free_eh_pool() but I figured we
> > might have other memory in use at some later date, and we wouldn't
> > want valgrind to have to start calling a second function, nor make a
> > function called __free_eh_pool() actually free other things.
>
> I tested this on x86_64-pc-linux-gnu with Ivo's valgrind patch from
> https://bugs.kde.org/show_bug.cgi?id=345307 and it works pretty nicely.
> No more spurious still reachable memory issues with memcheck.
>
> Is there any possibility to get this backported for 5.4?
If there is anything I can do to help move this patch forward, please
let me know.
Thanks,
Mark