https://gcc.gnu.org/bugzilla/show_bug.cgi?id=64535
Jakub Jelinek <jakub at gcc dot gnu.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |mark at gcc dot gnu.org --- Comment #19 from Jakub Jelinek <jakub at gcc dot gnu.org> --- I think a destructor is too risky here. Can't you just register with valgrind a pointer known not to be freed at exit? Would be nice to have something like __libc_freeres for libstdc++ too, that valgrind/mtrace/LeakSanitizer could invoke. I'm afraid tons of programs just do busy work in various threads until some thread exits the whole app, and your change could break it.