fun facts: - glib has, for some reason, a library constructor - which creates thread-local storage - which is configured with a destructor pointer within libglib - the library destructor does not destroy said storage - some libs you may want to dlopen()/dlclose() may link glib
-
-
do yall implement thread-local-storage destructors as noops too?
-
No. There are at least 2 types of TLS dtor. Keyed ones have dtor semantics specified by POSIX and C11. C++ ones are implemented by gcc on top of the former.
-
Arguably libc should provide a higher-quality C++ TLS implementation, but due to a design flaw in the ABI, it's impossible to do robustly without 800% memory overhead.
-
So since we can't actually make it better than what gcc already emulates without ridiculous overhead, for now we just let gcc be the one to do it [wrongly].
End of conversation
New conversation -
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.