Skip to content

Commit

Permalink
[release-branch.go1.11] runtime: mark sigInitIgnored nosplit
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
ianlancetaylor committed Aug 24, 2018
1 parent 89eb905 commit 41e62b8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/runtime/sigqueue.go
Expand Up @@ -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)
Expand Down

0 comments on commit 41e62b8

Please sign in to comment.