aboutsummaryrefslogtreecommitdiff
path: root/src/os/exec/exec.go
diff options
context:
space:
mode:
authorMatthew Dempsky <mdempsky@google.com>2022-05-11 12:44:06 -0700
committerGopher Robot <gobot@golang.org>2023-09-11 20:10:52 +0000
commit1cdabf0c8b1297a1b82fda975f9313f69b77b262 (patch)
tree68cc35c1c6d8662899ea4c2f04800061d0c3189b /src/os/exec/exec.go
parent3556d3b9bfe3ebfc8cd159464e46574e3de8fe7c (diff)
downloadgo-1cdabf0c8b1297a1b82fda975f9313f69b77b262.tar.xz
runtime: avoid staticinit dependency with sigsetAllExiting
Currently, package runtime runs `osinit` before dynamic initialization of package-scope variables; but on GOOS=linux, `osinit` involves mutating `sigsetAllExiting`. This currently works because cmd/compile and gccgo have non-spec-conforming optimizations that statically initialize `sigsetAllExiting`, but disabling that optimization causes `sigsetAllExiting` to be dynamically initialized instead. This in turn causes the mutations in `osinit` to get lost. This CL moves the initialization of `sigsetAllExiting` from `osinit` into its initialization expression, and then removes the special case for continuing to perform the static-initialization optimization for package runtime. Updates #51913. Change-Id: I3be31454277c103372c9701d227dc774b2311dad Reviewed-on: https://go-review.googlesource.com/c/go/+/405549 Auto-Submit: Matthew Dempsky <mdempsky@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com> Reviewed-by: Heschi Kreinick <heschi@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
Diffstat (limited to 'src/os/exec/exec.go')
0 files changed, 0 insertions, 0 deletions