aboutsummaryrefslogtreecommitdiff
path: root/src/syscall
diff options
context:
space:
mode:
authorRichard Miller <miller.research@gmail.com>2016-05-28 10:06:37 +0100
committerDavid du Colombier <0intro@gmail.com>2016-05-31 04:53:19 +0000
commit8e6e9e83818596048cfca1e121ad39b9b007ba28 (patch)
tree07f442f2627129cd90d81de8ed483972749ca324 /src/syscall
parentb3f98d7a42d04f6f173cd61ce3fe2106e4877496 (diff)
downloadgo-8e6e9e83818596048cfca1e121ad39b9b007ba28.tar.xz
syscall: plan9 - mark gbit16 as go:nosplit
This is a correction to CL 22610. The gbit16 function is called in StartProcess between fork and exec, and therefore must not split the stack. Normally it's inlined so this is not an issue, but on one occasion I've observed it to be compiled without inlining, and the result was a panic. Mark it go:nosplit to be safe. Change-Id: I0381754397b766431bf406d9767c73598d23b901 Reviewed-on: https://go-review.googlesource.com/23560 Reviewed-by: David du Colombier <0intro@gmail.com> Run-TryBot: David du Colombier <0intro@gmail.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Minux Ma <minux@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/syscall')
-rw-r--r--src/syscall/dir_plan9.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/syscall/dir_plan9.go b/src/syscall/dir_plan9.go
index 697bf5499c..15b267411c 100644
--- a/src/syscall/dir_plan9.go
+++ b/src/syscall/dir_plan9.go
@@ -184,6 +184,7 @@ func gbit8(b []byte) (uint8, []byte) {
}
// gbit16 reads a 16-bit number in little-endian order from b and returns it with the remaining slice of b.
+//go:nosplit
func gbit16(b []byte) (uint16, []byte) {
return uint16(b[0]) | uint16(b[1])<<8, b[2:]
}