googletest icon indicating copy to clipboard operation
googletest copied to clipboard

Fixed a race condition between the Watcher thread and the main thread during program exit.

Open cgyrling opened this issue 1 year ago • 1 comments
trafficstars

A race condition exist between the Watcher thread and main(). A case was found where the Watcher thread does not get execution time before the main function returns and calls atexit(). At that point the Watcher thread started runing tls_init() code while the main thread was shutting down. This resulted in rare crashes and deadlocks.

This fixes the following issue: (https://github.com/google/googletest/issues/4493)

cgyrling avatar Mar 18 '24 22:03 cgyrling