[libc-commits] [libc] [libc][patch 1/n] ensure tls dtors are called in main thread (PR #133641)
Schrodinger ZHU Yifan via libc-commits
libc-commits at lists.llvm.org
Mon Mar 31 14:51:53 PDT 2025
================
@@ -154,6 +154,9 @@ ThreadAtExitCallbackMgr *get_thread_atexit_callback_mgr() {
}
void call_atexit_callbacks(ThreadAttributes *attrib) {
+ if (attrib->dtors_called)
+ return;
+ attrib->dtors_called = true;
----------------
SchrodingerZhu wrote:
the whole attribute struct is in tls.
https://github.com/llvm/llvm-project/pull/133641
More information about the libc-commits
mailing list