https://gcc.gnu.org/bugzilla/show_bug.cgi?id=69945
Bug ID: 69945
Summary: Provide an equivalent of __libc_freeres to release
emergency EH pool memory
Product: gcc
Version: 5.3.0
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libstdc++
Assignee: unassigned at gcc dot gnu.org
Reporter: redi at gcc dot gnu.org
Target Milestone: ---
Glibc provides a hook that tools such as valgrind and sanitizers can call to
release "still reachable" memory that is in use at program exit.
We should do the same, so that the emergency EH pool can be freed, and people
will stop reporting "still reachable" memory as a leak in libstdc++.
It won't be possible to backport a new global symbol to gcc-5-branch unless we
do it before the gcc 6 release, using libstdc++.so.6.0.22 for gcc 5.4, and then
using libstdc++.so.6.0.23 for gcc 6.
To avoid exporting a new global symbol in gcc-5-branch it could be put in a
special section, which would allow valgrind to find it without going through
the symbol table. (We'd probably still want a global symbol for future
releases, so that other tools can call it the obvious way).