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
This commit is contained in:
Dmitry Vyukov 2021-10-24 09:22:58 +02:00
parent bb5e35833f
commit 75a08b1ba4
1 changed files with 1 additions and 1 deletions

View File

@ -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,