Open xiaq opened 10 months ago
(attn @golang/freebsd)
Note that this probably won't reproduce in the same way with a clang
built after https://github.com/llvm/clangir/commit/7440e4ed85aa992718d4b5ccd1c97724bc3bdd2c.
At any rate, this suggests that either there is a bug in Clang's Die
function or the sanitizer's use of it (called from here), or something in the Go runtime is preventing Die
from exiting with the intended nonzero exit code.
This is on FreeBSD 14.0 if that matters - I imagine clang is part of the base system and won't change for a release
We don't have any builders with anything newer than FreeBSD 13.0/13.1 IIRC.
I would be surprised if something in the runtime prevents exiting with a different exit code. The exit coming from the TSAN runtime is probably so hard there's not much we can do about it. (And I don't think we set any libc atexit hooks or anything.)
Go version
go version go1.21.6 freebsd/amd64
Output of
go env
in your module/workspace:What did you do?
Ensure ASLR is enabled:
Write a test that fails. For reasons I don't understand, this issue only reproduces when the test imports
plugin
.Run the test without
-race
and it fails, as expected:However, if you run the test with
-race
, it prints out a warning message and goes on to report the test as if it succeeded:Since the test always fails, it seems that
go test -race
doesn't actually run the test.What did you see happen?
go test -race
reports "ok" and exits with 0.What did you expect to see?
go test -race
should report failure and exit with 1.