aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug_test.go
diff options
context:
space:
mode:
authorAustin Clements <austin@google.com>2021-04-09 16:08:28 -0400
committerAustin Clements <austin@google.com>2021-04-11 20:07:18 +0000
commit352d329c44d99b5c6cb325940006ca52f88195f3 (patch)
tree9de5e1d1a594d21f6a004636f0b3d33fc9d22e43 /src/runtime/debug_test.go
parent189c6946f598dc668946499e4179775c06295f9d (diff)
downloadgo-352d329c44d99b5c6cb325940006ca52f88195f3.tar.xz
runtime: move zero-sized frame check from newproc to newproc1
If GOEXPERIMENT=regabidefer is enabled, newproc currently checks that the call frame for new goroutines is empty. But there's one place in the runtime (debugCallWrap), where we call newproc1, and it happens to pass a non-empty frame. The current check didn't catch that. Move the empty call frame check from newproc to newproc1 to catch this. Updates #40724. Change-Id: I9998faf1e07e7b7af88e06a8177127f998c40252 Reviewed-on: https://go-review.googlesource.com/c/go/+/309034 Trust: Austin Clements <austin@google.com> Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Than McIntosh <thanm@google.com> Reviewed-by: Cherry Zhang <cherryyz@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/runtime/debug_test.go')
-rw-r--r--src/runtime/debug_test.go8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/runtime/debug_test.go b/src/runtime/debug_test.go
index c4c41f95f2..7f9e460303 100644
--- a/src/runtime/debug_test.go
+++ b/src/runtime/debug_test.go
@@ -9,8 +9,12 @@
// spends all of its time in the race runtime, which isn't a safe
// point.
-//go:build amd64 && linux && !race
-// +build amd64,linux,!race
+// TODO(register args): We skip this under GOEXPERIMENT=regabidefer
+// because debugCallWrap passes a non-empty frame to newproc1,
+// triggering a panic.
+
+//go:build amd64 && linux && !race && !goexperiment.regabidefer
+// +build amd64,linux,!race,!goexperiment.regabidefer
package runtime_test