[patch] libstdc++/69945 Add __gnu_cxx::__freeres hook

Jonathan Wakely jwakely@redhat.com
Thu Mar 24 18:41:00 GMT 2016


On 16/03/16 16:29 +0100, Mark Wielaard wrote:
>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.

Sorry for stalling, other things distracted me. It's committed to
trunk now though.



More information about the Gcc-patches mailing list