Skip to content

Commit

Permalink
runtime: add missing //go:nosplit for efaceOf
Browse files Browse the repository at this point in the history
This fix prevents additional stack checking code from being
generated on func efaceOf to avoid unexpected growth of stack
in child process.

Fixes golang#48967
  • Loading branch information
honsunrise committed Oct 15, 2021
1 parent 1cbec68 commit 6bd54c2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/runtime/runtime2.go
Expand Up @@ -209,6 +209,7 @@ type eface struct {
data unsafe.Pointer
}

//go:nosplit
func efaceOf(ep *interface{}) *eface {
return (*eface)(unsafe.Pointer(ep))
}
Expand Down

0 comments on commit 6bd54c2

Please sign in to comment.