go does not reject -race when buildmode=pie is enabled by default
@av86743 The platforms where pie is enabled by default in the toolchain are android/arm, android/arm64, android/amd64, and android/386 but none of these supports the race detector, so in practise this is not a problem, and we can just reject -race by checking that --buildmode=pie was set.
If you set -race with one of those you'll get an error in an early check informing you that you can't use the race detector.
So the only way to see the crash reported here is to use a patched toolchain (like the go-pie in Arch).
Usually we don't fix issues that can be triggered exclusively on patches applied downstream.
changed the title
go build/run -race build program that fails with ERROR: ThreadSanitizer failed to allocateAug 7, 2019