Fixed
Pinned fields
Click on the next to a field label to start pinning.
Details
Components
Assignee
Jacob Cobbett-SmithJacob Cobbett-SmithReporter
Jacob Cobbett-SmithJacob Cobbett-SmithPriority
MinorCompatibility
PointFix versions
Pull Request URL
Details
Details
Components
Assignee
Jacob Cobbett-Smith
Jacob Cobbett-SmithReporter
Jacob Cobbett-Smith
Jacob Cobbett-SmithPriority
Compatibility
Point
Fix versions
Pull Request URL
Created December 3, 2019 at 12:37 PM
Updated December 6, 2019 at 12:57 PM
Resolved December 6, 2019 at 12:57 PM
If a thread hook is added whilst on the main thread, then there there is no automatic call to callThreadTerminationHooks.
Instead the hooks are called as part of the module exit scheme.
However, the hooks vector is a thread local variable, which has wound up by the time atexit handling happens, and so accessing vector elements causes a crash.
NB: If ExitModuleObjects() is called at end of main() this avoids the issue.
Fix by spotting hooks added on main thread and track using a separate vector (that is not a thread local).