aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug_test.go
diff options
context:
space:
mode:
authorMichael Anthony Knyszek <mknyszek@google.com>2024-10-28 17:23:40 +0000
committerMichael Knyszek <mknyszek@google.com>2024-10-28 21:04:51 +0000
commit579eb79f62d92db872d730f5fe954ca2b7dce8ae (patch)
treeed7e1a415490d4e0d8a44c8e35f7c5728b812479 /src/runtime/debug_test.go
parent808da68c1c66e05a04a7d4bc046f27811711d7ff (diff)
downloadgo-579eb79f62d92db872d730f5fe954ca2b7dce8ae.tar.xz
all: skip and fix various tests with -asan and -msan
First, skip all the allocation count tests. In some cases this aligns with existing skips for -race, but in others we've got new issues. These are debug modes, so some performance loss is expected, and this is clearly no worse than today where the tests fail. Next, skip internal linking and static linking tests for msan and asan. With asan we get an explicit failure that neither are supported by the C and/or Go compilers. With msan, we only get the Go compiler telling us internal linking is unavailable. With static linking, we segfault instead. Filed #70080 to track that. Next, skip some malloc tests with asan that don't quite work because of the redzone. This is because of some sizeclass assumptions that get broken with the redzone and the fact that the tiny allocator is effectively disabled (again, due to the redzone). Next, skip some runtime/pprof tests with asan, because of extra allocations. Next, skip some malloc tests with asan that also fail because of extra allocations. Next, fix up memstats accounting for arenas when asan is enabled. There is a bug where more is added to the stats than subtracted. This also simplifies the accounting a little. Next, skip race tests with msan or asan enabled; they're mutually incompatible. Fixes #70054. Fixes #64256. Fixes #64257. For #70079. For #70080. Change-Id: I99c02a0b9d621e44f1f918b307aa4a4944c3ec60 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-asan-clang15,gotip-linux-amd64-msan-clang15 Reviewed-on: https://go-review.googlesource.com/c/go/+/622855 Reviewed-by: Cherry Mui <cherryyz@google.com> TryBot-Bypass: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/debug_test.go')
-rw-r--r--src/runtime/debug_test.go10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/runtime/debug_test.go b/src/runtime/debug_test.go
index 0ee873d43f..37093cd87e 100644
--- a/src/runtime/debug_test.go
+++ b/src/runtime/debug_test.go
@@ -16,6 +16,8 @@ package runtime_test
import (
"fmt"
"internal/abi"
+ "internal/asan"
+ "internal/msan"
"math"
"os"
"regexp"
@@ -32,6 +34,14 @@ func startDebugCallWorker(t *testing.T) (g *runtime.G, after func()) {
// a debugger.
skipUnderDebugger(t)
+ // asan/msan instrumentation interferes with tests since we might
+ // inject debugCallV2 while in the asan/msan runtime. This is a
+ // problem for doing things like running the GC or taking stack
+ // traces. Not sure why this is happening yet, but skip for now.
+ if msan.Enabled || asan.Enabled {
+ t.Skip("debugCallV2 is injected erroneously during asan/msan runtime calls; skipping")
+ }
+
// This can deadlock if there aren't enough threads or if a GC
// tries to interrupt an atomic loop (see issue #10958). Execute
// an extra GC to ensure even the sweep phase is done (out of