// 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
//
//go:nosplit
func newproc(siz int32, fn *funcval) {
- if goexperiment.RegabiDefer && siz != 0 {
- // TODO: When we commit to GOEXPERIMENT=regabidefer,
- // rewrite newproc's comment, since it will no longer
- // have a funny stack layout or need to be nosplit.
- throw("go with non-empty frame")
- }
argp := add(unsafe.Pointer(&fn), sys.PtrSize)
gp := getg()
pc := getcallerpc()
//
//go:systemstack
func newproc1(fn *funcval, argp unsafe.Pointer, narg int32, callergp *g, callerpc uintptr) *g {
+ if goexperiment.RegabiDefer && narg != 0 {
+ // TODO: When we commit to GOEXPERIMENT=regabidefer,
+ // rewrite the comments for newproc and newproc1.
+ // newproc will no longer have a funny stack layout or
+ // need to be nosplit.
+ throw("go with non-empty frame")
+ }
+
_g_ := getg()
if fn == nil {