Skip to content

Commit 011da16

Browse files
cuonglmgopherbot
authored andcommitted
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 <[email protected]> LUCI-TryBot-Result: Go LUCI <[email protected]> Reviewed-by: Ian Lance Taylor <[email protected]> Auto-Submit: Cuong Manh Le <[email protected]>
1 parent 1b1c6b8 commit 011da16

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cmd/compile/internal/test/issue71943_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ package test
66

77
import (
88
"crypto/sha256"
9+
"internal/testenv"
910
"runtime"
1011
"testing"
1112
)
@@ -15,6 +16,7 @@ func Verify(token, salt string) [32]byte {
1516
}
1617

1718
func TestIssue71943(t *testing.T) {
19+
testenv.SkipIfOptimizationOff(t)
1820
if n := testing.AllocsPerRun(10, func() {
1921
runtime.KeepAlive(Verify("teststring", "test"))
2022
}); n > 0 {

0 commit comments

Comments
 (0)