]> Cypherpunks.ru repositories - gostls13.git/commit
runtime: move zero-sized frame check from newproc to newproc1
authorAustin Clements <austin@google.com>
Fri, 9 Apr 2021 20:08:28 +0000 (16:08 -0400)
committerAustin Clements <austin@google.com>
Sun, 11 Apr 2021 20:07:18 +0000 (20:07 +0000)
commit352d329c44d99b5c6cb325940006ca52f88195f3
tree9de5e1d1a594d21f6a004636f0b3d33fc9d22e43
parent189c6946f598dc668946499e4179775c06295f9d
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>
src/runtime/debug_test.go
src/runtime/proc.go