From: khr@golang.org Date: Tue, 20 May 2025 22:59:02 +0000 (-0700) Subject: reflect: turn off allocation test if instrumentation is on X-Git-Tag: go1.25rc1~175 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=a070533633bd709bc3598dbd7c28edca1d2ba6e2;p=gostls13.git reflect: turn off allocation test if instrumentation is on Help fix the asan builders. Change-Id: I980f5171519643c3543bdefc6ea46fd0fca17c28 Reviewed-on: https://go-review.googlesource.com/c/go/+/674616 Reviewed-by: Dmitri Shuralyov Reviewed-by: Keith Randall Auto-Submit: Keith Randall LUCI-TryBot-Result: Go LUCI Reviewed-by: Dmitri Shuralyov --- diff --git a/src/reflect/all_test.go b/src/reflect/all_test.go index e86ee9d322..fb1a29d060 100644 --- a/src/reflect/all_test.go +++ b/src/reflect/all_test.go @@ -13,6 +13,8 @@ import ( "internal/asan" "internal/goarch" "internal/goexperiment" + "internal/msan" + "internal/race" "internal/testenv" "io" "math" @@ -8766,6 +8768,9 @@ func TestTypeAssertPanic(t *testing.T) { } func TestTypeAssertAllocs(t *testing.T) { + if race.Enabled || asan.Enabled || msan.Enabled { + t.Skip("instrumentation breaks this optimization") + } typeAssertAllocs[[128]int](t, ValueOf([128]int{}), 0) typeAssertAllocs[any](t, ValueOf([128]int{}), 0)