aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/os_linux_mips64x.go
diff options
context:
space:
mode:
authorHaoran Luo <haoran.luo@chaitin.com>2020-12-08 14:29:04 +0000
committerAustin Clements <austin@google.com>2020-12-09 03:01:58 +0000
commit6fa06d960b5ec38867a35dc278ae318ecff1b6c6 (patch)
treefca89816eb6d8840f7b501dc4c41ea2821ab4806 /src/runtime/os_linux_mips64x.go
parentae9b442df2436b3d65ef765572681bf9aacdfbbb (diff)
downloadgo-6fa06d960b5ec38867a35dc278ae318ecff1b6c6.tar.gz
go-6fa06d960b5ec38867a35dc278ae318ecff1b6c6.zip
runtime: prevent stack growth after fork in runtime.sigfillset
This fixes the unexpected growth of stack in child process, which is caused by stack checking code in runtime.sigfillset called from runtime.sigset while clearing the signal handlers in child process. The redundant stack checking code is generated due to missing '//go:nosplit' directive that should be annotated for runtime.sigfillset. Fixes #43066 Updates #21314 Change-Id: I9483a962a4b0747074313991841e2440ee32198c Reviewed-on: https://go-review.googlesource.com/c/go/+/276173 Run-TryBot: Austin Clements <austin@google.com> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Michael Pratt <mpratt@google.com> Reviewed-by: Austin Clements <austin@google.com>
Diffstat (limited to 'src/runtime/os_linux_mips64x.go')
-rw-r--r--src/runtime/os_linux_mips64x.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/runtime/os_linux_mips64x.go b/src/runtime/os_linux_mips64x.go
index 4ff66f9538..815a83a04b 100644
--- a/src/runtime/os_linux_mips64x.go
+++ b/src/runtime/os_linux_mips64x.go
@@ -48,6 +48,7 @@ func sigdelset(mask *sigset, i int) {
(*mask)[(i-1)/64] &^= 1 << ((uint32(i) - 1) & 63)
}
+//go:nosplit
func sigfillset(mask *[2]uint64) {
(*mask)[0], (*mask)[1] = ^uint64(0), ^uint64(0)
}