Skip to content

Commit e612d21

Browse files
aclementsgopherbot
authored andcommitted
misc/cgo/testasan: drop test
The testasan test was added back in 2013 (CL 10126044), many years before Go added ASAN support in 2021 (CL 298611). So, in fact, testasan does not test Go ASAN support at all, as you might expect (misc/cgo/testsanitizers does that). It's intended to test whether the Go memory allocator works in a mixed C/Go binary where the C code is compiled with ASAN. The test doesn't actually use ASAN in any way; it just simulates where ASAN of 2013 put its shadow mappings. This made sense to test at the time because Go was picky about where its heap landed and ASAN happened to put its mappings exactly where Go wanted to put its heap. These days, Go is totally flexible about its heap placement, and I wouldn't be surprised if ASAN also works differently. Given all of this, this test adds almost no value today. Drop it. For #37486, since it eliminates a non-go-test from dist. Change-Id: I0292f8efbdc0e1e39650715604535c445fbaa87f Reviewed-on: https://go-review.googlesource.com/c/go/+/443067 Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Austin Clements <[email protected]> Reviewed-by: Bryan Mills <[email protected]> Run-TryBot: Austin Clements <[email protected]> TryBot-Result: Gopher Robot <[email protected]>
1 parent 4e3d805 commit e612d21

File tree

2 files changed

+0
-59
lines changed

2 files changed

+0
-59
lines changed

misc/cgo/testasan/main.go

-56
This file was deleted.

src/cmd/dist/test.go

-3
Original file line numberDiff line numberDiff line change
@@ -823,9 +823,6 @@ func (t *tester) registerTests() {
823823
if t.supportedBuildmode("plugin") {
824824
t.registerTest("testplugin", "../misc/cgo/testplugin", t.goTest(), t.timeout(600), ".")
825825
}
826-
if gohostos == "linux" && (goarch == "amd64" || goarch == "ppc64le") {
827-
t.registerTest("testasan", "../misc/cgo/testasan", "go", "run", ".")
828-
}
829826
if goos == "linux" || (goos == "freebsd" && goarch == "amd64") {
830827
// because Pdeathsig of syscall.SysProcAttr struct used in misc/cgo/testsanitizers is only
831828
// supported on Linux and FreeBSD.

0 commit comments

Comments
 (0)