aboutsummaryrefslogtreecommitdiff
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 20:18:43 +0000
commit41e62b8c49d21659b48a95216e3062032285250f (patch)
tree74b0912f2f7cee3a722fcbfa6c9116ecd9a2e205
parent89eb905c6d92c7e6cda4de6c48f8d556e996bcb2 (diff)
downloadgo-41e62b8c49d21659b48a95216e3062032285250f.tar.gz
go-41e62b8c49d21659b48a95216e3062032285250f.zip
[release-branch.go1.11] runtime: mark sigInitIgnored nosplitgo1.11
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> (cherry picked from commit d20ecd6e5dab55376ea4f169eed63608f9bb3b2b) Reviewed-on: https://go-review.googlesource.com/131278 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org>
-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)