From: Cuong Manh Le Date: Wed, 26 Feb 2025 14:04:04 +0000 (+0700) Subject: cmd/compile/internal/test: fix noopt builder X-Git-Tag: go1.25rc1~901 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=011da163f475b38ad70c9c652df6dc8dc2ba5168;p=gostls13.git cmd/compile/internal/test: fix noopt builder The function argument passed to hash function escaped to heap when optimization is disabled, causing the builder failed. To fix this, skip the test on noopt builder. Updates #71943 Fixes #71965 Cq-Include-Trybots: luci.golang.try:gotip-linux-amd64-noopt Change-Id: I3a9ece09bfa10bf5eb102a7da3ade65634565cb4 Reviewed-on: https://go-review.googlesource.com/c/go/+/652735 Reviewed-by: Dmitri Shuralyov LUCI-TryBot-Result: Go LUCI Reviewed-by: Ian Lance Taylor Auto-Submit: Cuong Manh Le --- diff --git a/src/cmd/compile/internal/test/issue71943_test.go b/src/cmd/compile/internal/test/issue71943_test.go index 23312b4ee1..a92b0a1e2b 100644 --- a/src/cmd/compile/internal/test/issue71943_test.go +++ b/src/cmd/compile/internal/test/issue71943_test.go @@ -6,6 +6,7 @@ package test import ( "crypto/sha256" + "internal/testenv" "runtime" "testing" ) @@ -15,6 +16,7 @@ func Verify(token, salt string) [32]byte { } func TestIssue71943(t *testing.T) { + testenv.SkipIfOptimizationOff(t) if n := testing.AllocsPerRun(10, func() { runtime.KeepAlive(Verify("teststring", "test")) }); n > 0 {