go: cmd/go: reject use of PIE with -race
What version of Go are you using (go version
)?
1.7.4
What operating system and processor architecture are you using (go env
)?
OS: CoreOS 1010.6.0 (Linux 4.5.7) Arch: x86_64
What did you do?
Built a binary with -race
in our CI environment (also x86_64 Linux but not CoreOS), ran it on CoreOS, immediately got a segfault.
What did you expect to see?
No segfault 😃 Building this same binary without the race detector and running it on CoreOS works just fine.
What did you see instead?
==45515==ERROR: ThreadSanitizer failed to allocate 0x2790000 (41484288) bytes at address 1775919824880 (errno: 12)
unexpected fault address 0x0
fatal error: fault
[signal SIGSEGV: segmentation violation code=0x80 addr=0x0 pc=0x55d645f23ea5]
goroutine 1 [running, locked to thread]:
runtime.throw(0x0, 0x7fff2385c478)
/usr/local/go/src/runtime/panic.go:566 +0x97 fp=0x7fff2385c408 sp=0x7fff2385c3e8
goroutine 17 [syscall, locked to thread]:
runtime.goexit()
/usr/local/go/src/runtime/asm_amd64.s:2086 +0x1
One other important detail: this binary was run under Mesos 1.0.3. The only resource restrictions in place (applied via cgroups) were 4 GB of memory and 4 (relative) CPU shares.
About this issue
- Original URL
- State: closed
- Created 7 years ago
- Comments: 18 (11 by maintainers)
Rejecting that combination in cmd/go SGTM.