[compiler-rt] 75a08b1 - tsan: don't use symbol binding 10

Dmitry Vyukov via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 25 05:06:19 PDT 2021


Author: Dmitry Vyukov
Date: 2021-10-25T14:05:15+02:00
New Revision: 75a08b1ba4c105d7a63fac93ea70f5546a2dd2d7

URL: https://github.com/llvm/llvm-project/commit/75a08b1ba4c105d7a63fac93ea70f5546a2dd2d7
DIFF: https://github.com/llvm/llvm-project/commit/75a08b1ba4c105d7a63fac93ea70f5546a2dd2d7.diff

LOG: tsan: don't use symbol binding 10

Building Go programs with the current runtime fails with:

loadelf: race_linux_amd64: malformed elf file:
_ZZN6__tsan15RestoreAddrImpl5ApplyINS_11MappingGo48EEEmmE6ranges: invalid symbol binding 10

Go linker does not understand ELF in all its generality.
Don't use static const data in inline methods.

Reviewed By: melver

Differential Revision: https://reviews.llvm.org/D112434

Added: 
    

Modified: 
    compiler-rt/lib/tsan/rtl/tsan_platform.h

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/tsan/rtl/tsan_platform.h b/compiler-rt/lib/tsan/rtl/tsan_platform.h
index fc27a5656aadf..7ff0acace8f6d 100644
--- a/compiler-rt/lib/tsan/rtl/tsan_platform.h
+++ b/compiler-rt/lib/tsan/rtl/tsan_platform.h
@@ -906,7 +906,7 @@ struct RestoreAddrImpl {
     // 3 bits of the compressed addr match that of the app range. If yes, we
     // assume that the compressed address come from that range and restore the
     // missing top bits to match the app range address.
-    static constexpr uptr ranges[] = {
+    const uptr ranges[] = {
         Mapping::kLoAppMemBeg,  Mapping::kLoAppMemEnd, Mapping::kMidAppMemBeg,
         Mapping::kMidAppMemEnd, Mapping::kHiAppMemBeg, Mapping::kHiAppMemEnd,
         Mapping::kHeapMemBeg,   Mapping::kHeapMemEnd,


        


More information about the llvm-commits mailing list