在 2026-7-6 18:55, Martin Storsjö 写道:
Oh, intresting. There are other known problems with C++ TLS dtors and emutls freeing the memory as well - although I don't remember if that was at thread exit, DLL unload or process exit though, so I guess this also would avoid some aspects of that problem too.

I'm not too optimistic, but meh.


Does this hold for pthread_key_create right now, that the callbacks aren't called on process exit? Then that's a good argument for this change.

It's the case with winpthreads. In winpthreads/src/thread.c, `_pthread_cleanup_dest()` is called only upon `DLL_THREAD_DETACH` and not upon `DLL_PROCESS_DETACH`.



--
Best regards,
LIU Hao

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to