aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorIan Lance Taylor <iant@golang.org>2018-08-24 11:44:55 -0700
committerIan Lance Taylor <iant@golang.org>2018-08-24 19:05:34 +0000
commit97f153528513e9a7ededf7e0aca7a4e30a3f4fe7 (patch)
tree657f405649f10ba1f5297842d632b6c0b9fee84a /src
parent05c02444eb2d8b8d3ecd949c4308d8e2323ae087 (diff)
downloadgo-97f153528513e9a7ededf7e0aca7a4e30a3f4fe7.tar.xz
runtime: mark sigInitIgnored nosplit
The sigInitIgnored function can be called by initsig before a shared library is initialized, before the runtime is initialized. Fixes #27183 Change-Id: I7073767938fc011879d47ea951d63a14d1cce878 Reviewed-on: https://go-review.googlesource.com/131277 Run-TryBot: Ian Lance Taylor <iant@golang.org> Reviewed-by: Austin Clements <austin@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/sigqueue.go6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/runtime/sigqueue.go b/src/runtime/sigqueue.go
index 9f53240954..a425433b20 100644
--- a/src/runtime/sigqueue.go
+++ b/src/runtime/sigqueue.go
@@ -237,8 +237,10 @@ func signal_ignore(s uint32) {
atomic.Store(&sig.ignored[s/32], i)
}
-// sigInitIgnored marks the signal as already ignored. This is called at
-// program start by siginit.
+// sigInitIgnored marks the signal as already ignored. This is called at
+// program start by initsig. In a shared library initsig is called by
+// libpreinit, so the runtime may not be initialized yet.
+//go:nosplit
func sigInitIgnored(s uint32) {
i := sig.ignored[s/32]
i |= 1 << (s & 31)