You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Seen on linux amd64 1.6 (but verified present at tip as well)
When using the race detector and C++ code is linked into the process as well it's possible for 2 threads to call racefini() today which eventually calls __tsan_fini which itself calls the regular C library exit().
Calling exit > 1 times is undefined behavior and means in a C++ program that the static destructors get invoked twice. On a glibc implementation of the exit handlers it also means a double free() occurs when the entry from the exit handlers list is freed upon completion.
The text was updated successfully, but these errors were encountered:
ianlancetaylor
changed the title
race detector can call exit() more than once on finish
runtime/race: race detector can call exit more than once on finish
May 6, 2016
Seen on linux amd64 1.6 (but verified present at tip as well)
When using the race detector and C++ code is linked into the process as well it's possible for 2 threads to call racefini() today which eventually calls __tsan_fini which itself calls the regular C library exit().
Calling exit > 1 times is undefined behavior and means in a C++ program that the static destructors get invoked twice. On a glibc implementation of the exit handlers it also means a double free() occurs when the entry from the exit handlers list is freed upon completion.
The text was updated successfully, but these errors were encountered: