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? Thanks, Mark