Commit dac87e9e authored by Shenghou Ma's avatar Shenghou Ma Committed by Minux Ma

cmd/compile/internal/gc: allow //go:systemstack only in runtime

Fixes #12454.

Change-Id: I6406b0119bc4d6c3d1e6f1896b588b7d101448a3
Reviewed-on: https://go-review.googlesource.com/14274
Run-TryBot: Minux Ma <minux@golang.org>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
parent e16d8036
...@@ -1623,6 +1623,9 @@ func getlinepragma() int { ...@@ -1623,6 +1623,9 @@ func getlinepragma() int {
} }
if verb == "go:systemstack" { if verb == "go:systemstack" {
if compiling_runtime == 0 {
Yyerror("//go:systemstack only allowed in runtime")
}
systemstack = true systemstack = true
return c return c
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment