I noticed there's a go:noescape compiler directive that seems to provide an escape hatch for a lot of this unexpected compiler behaviour:
https://golang.org/cmd/compile/#hdr-Compiler_Directives
Does that actually work?
https://golang.org/cmd/compile/#hdr-Compiler_Directives
Does that actually work?