[compiler-rt] 13fb97d - tsan: add missing guard for DumpProcessMap call

Than McIntosh via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 27 07:10:50 PDT 2022


Author: Than McIntosh
Date: 2022-06-27T10:10:45-04:00
New Revision: 13fb97d68821e1948d176057ebee94f50cb05b62

URL: https://github.com/llvm/llvm-project/commit/13fb97d68821e1948d176057ebee94f50cb05b62
DIFF: https://github.com/llvm/llvm-project/commit/13fb97d68821e1948d176057ebee94f50cb05b62.diff

LOG: 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

Added: 
    

Modified: 
    compiler-rt/lib/tsan/rtl/tsan_rtl.cpp

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp b/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
index b1556149033be..3977d60c36e54 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
+++ b/compiler-rt/lib/tsan/rtl/tsan_rtl.cpp
@@ -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);


        


More information about the llvm-commits mailing list