tsan: add missing guard for DumpProcessMap call

Add a missing "#if !SANITIZER_GO" guard for a call to DumpProcessMap
in the Finalize hook (needed to build an updated Go race detector syso
image).

Reviewed By: dvyukov

Differential Revision: https://reviews.llvm.org/D128641
This commit is contained in:
Than McIntosh 2022-06-27 09:28:18 -04:00
parent 45b995cda4
commit 13fb97d688
1 changed files with 2 additions and 0 deletions

View File

@ -722,8 +722,10 @@ void MaybeSpawnBackgroundThread() {
int Finalize(ThreadState *thr) {
bool failed = false;
#if !SANITIZER_GO
if (common_flags()->print_module_map == 1)
DumpProcessMap();
#endif
if (flags()->atexit_sleep_ms > 0 && ThreadCount(thr) > 1)
internal_usleep(u64(flags()->atexit_sleep_ms) * 1000);