[Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap

2024-01-22 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113401 --- Comment #9 from Iain Sandoe --- (In reply to Florian Weimer from comment #8) > Which version of the manual page are you looking at? > > https://man7.org/linux/man-pages/man3/pthread_cleanup_push.3.html seems > pretty clear about the

[Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap

2024-01-22 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113401 --- Comment #8 from Florian Weimer --- Which version of the manual page are you looking at? https://man7.org/linux/man-pages/man3/pthread_cleanup_push.3.html seems pretty clear about the scope-based nature (search for discussion of

[Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap

2024-01-22 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113401 --- Comment #7 from Iain Sandoe --- (In reply to Florian Weimer from comment #6) > Sorry, pthread_cleanup_push is purely scope-based, like the existing > handler. It cannot be used to push a handler to some unscoped cleanup > function list that

[Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap

2024-01-22 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113401 --- Comment #6 from Florian Weimer --- Sorry, pthread_cleanup_push is purely scope-based, like the existing handler. It cannot be used to push a handler to some unscoped cleanup function list that persists even after the current function

[Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap

2024-01-22 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113401 --- Comment #5 from Iain Sandoe --- (In reply to Florian Weimer from comment #4) > (In reply to Iain Sandoe from comment #3) > > for platforms using pthreads as the underlying resource, then perhaps we can > > do this without thread_atexit

[Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap

2024-01-22 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113401 --- Comment #4 from Florian Weimer --- (In reply to Iain Sandoe from comment #3) > for platforms using pthreads as the underlying resource, then perhaps we can > do this without thread_atexit (which I do not see in many places) by using >

[Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap

2024-01-21 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113401 --- Comment #3 from Iain Sandoe --- for platforms using pthreads as the underlying resource, then perhaps we can do this without thread_atexit (which I do not see in many places) by using pthread_cleanup_push () not sure if gthr.h abstracts

[Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap

2024-01-15 Thread fw at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113401 --- Comment #2 from Florian Weimer --- (In reply to Iain Sandoe from comment #1) > (In reply to Florian Weimer from comment #0) > > > The fix is to register a TLS destructor to > > deallocate that page, too. On glibc, that also fixes another

[Bug libgcc/113401] Memory (resource) leak in -ftrampoline-impl=heap

2024-01-15 Thread iains at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=113401 Iain Sandoe changed: What|Removed |Added CC||iains at gcc dot gnu.org --- Comment #1