This is an archive of the discontinued LLVM Phabricator instance.

tsan: work around malloc reserved address range on macOS 12
Needs ReviewPublic

Authored by cherry on Nov 30 2021, 3:48 PM.

Details

Reviewers
dvyukov
Summary

On macOS 12 a new malloc implementation (nano) is used by default, and apparently it reserves address range 0x600000000000-0x600020000000, which conflicts with the address range that TSAN uses for Go ( https://github.com/golang/go/issues/49138 ). Work around the issue by changing the address range slightly.

NOTE: on LLVM tip a new TSAN runtime (v3) has landed, which also makes the problem go away. But for Go 1.18 release, we may do something less massive. This change is not intended to be landed on LLVM tip, but rather a minimal change based on an old commit of LLVM (which Go currently uses) for Go 1.18.

Diff Detail

Event Timeline

cherry requested review of this revision.Nov 30 2021, 3:48 PM
cherry created this revision.
Herald added a project: Restricted Project. · View Herald TranscriptNov 30 2021, 3:48 PM
Herald added a subscriber: Restricted Project. · View Herald Transcript

Dmitry,

As noted above, this is not intended to land on LLVM tip, but for Go 1.18 where we may want to do something less massive. Do you think this change makes sense? Or there is a better address we could use? Thanks!

zchee added a subscriber: zchee.Nov 30 2021, 10:34 PM

This looks fine as a hot fix.