-
Type: Bug
-
Resolution: Fixed
-
Priority: Major - P3
-
Affects Version/s: None
-
Component/s: None
-
None
-
Fully Compatible
-
ALL
-
v5.2
-
Security 2022-01-24
-
27
On Windows, an access violation may occur if the main thread returns normally from the main() function while the signal handler thread is still in the process of initializing thread local variables that require access to static global variables (e.g. ThreadContext::_handler calling Decorable::getRegistry()). This is because the windows C runtime library registers an atexit() handler that destroys the global mutex that is used to ensure that accesses to static global variables are thread-safe. If quickExit() is called instead of returning normally from main(), then it will call TerminateProcess() which simply terminates all threads without needing to run atexit() handlers.