diff options
author | Russ Cox <rsc@golang.org> | 2023-02-08 14:02:55 -0500 |
---|---|---|
committer | Gopher Robot <gobot@golang.org> | 2023-02-10 17:19:24 +0000 |
commit | a943fd0cccc6043e6a3397659f3f262544e615b2 (patch) | |
tree | 813e1527fdab467aeb2c0a0f54bd791fc17e9de9 | |
parent | fbba58a0a4f5ff4f3aa4cfa0d494b6d2fefd068a (diff) | |
download | go-a943fd0cccc6043e6a3397659f3f262544e615b2.tar.gz go-a943fd0cccc6043e6a3397659f3f262544e615b2.zip |
[release-branch.go1.20] runtime: skip darwin osinit_hack on ios
Darwin needs the osinit_hack call to fix some bugs in the Apple libc
that surface when Go programs call exec. On iOS, the functions that
osinit_hack uses are not available, so signing fails. But on iOS exec
is also unavailable, so the hack is not needed. Disable it there,
which makes signing work again.
Fixes #58323.
Fixes #58419.
Change-Id: I3f1472f852bb36c06854fe1f14aa27ad450c5945
Reviewed-on: https://go-review.googlesource.com/c/go/+/466516
Run-TryBot: Russ Cox <rsc@golang.org>
Reviewed-by: Dave Anderson <danderson@tailscale.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Russ Cox <rsc@golang.org>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Than McIntosh <thanm@google.com>
Reviewed-on: https://go-review.googlesource.com/c/go/+/467316
-rw-r--r-- | src/runtime/sys_darwin.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runtime/sys_darwin.go b/src/runtime/sys_darwin.go index 8bff695f57..5ba697e304 100644 --- a/src/runtime/sys_darwin.go +++ b/src/runtime/sys_darwin.go @@ -213,7 +213,9 @@ func pthread_kill_trampoline() // //go:nosplit func osinit_hack() { - libcCall(unsafe.Pointer(abi.FuncPCABI0(osinit_hack_trampoline)), nil) + if GOOS == "darwin" { // not ios + libcCall(unsafe.Pointer(abi.FuncPCABI0(osinit_hack_trampoline)), nil) + } return } func osinit_hack_trampoline() |