Skip to content

Commit

Permalink
runtime: improve systemstack-on-Go stack message
Browse files Browse the repository at this point in the history
We reused the old C stack check mechanism for the implementation of
//go:systemstack, so when we execute a //go:systemstack function on a
user stack, the system fails by calling morestackc. However,
morestackc's message still talks about "executing C code".

Fix morestackc's message to reflect its modern usage.

Change-Id: I7e70e7980eab761c0520f675d3ce89486496030f
Reviewed-on: https://go-review.googlesource.com/38572
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Ian Lance Taylor <iant@golang.org>
  • Loading branch information
aclements authored and lparth committed Apr 13, 2017
1 parent 60ea5b3 commit 3e37806
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/runtime/stack.go
Original file line number Diff line number Diff line change
Expand Up @@ -1188,6 +1188,6 @@ func freeStackSpans() {
//go:nosplit
func morestackc() {
systemstack(func() {
throw("attempt to execute C code on Go stack")
throw("attempt to execute system stack code on user stack")
})
}

0 comments on commit 3e37806

Please sign in to comment.