From 8e6e9e83818596048cfca1e121ad39b9b007ba28 Mon Sep 17 00:00:00 2001 From: Richard Miller Date: Sat, 28 May 2016 10:06:37 +0100 Subject: [PATCH] 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 Reviewed-by: Minux Ma Reviewed-by: Ian Lance Taylor --- src/syscall/dir_plan9.go | 1 + 1 file changed, 1 insertion(+) 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:] } -- 2.50.0