]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.14] runtime: stop preemption during syscall.Exec on Darwin
authorIan Lance Taylor <iant@golang.org>
Wed, 14 Oct 2020 23:03:48 +0000 (16:03 -0700)
committerIan Lance Taylor <iant@golang.org>
Tue, 20 Oct 2020 21:38:24 +0000 (21:38 +0000)
commitd9dab4f15e7cfc9553e3abd70cbe2a1a8e3d5547
tree80b55bc8cee9ffb49c4c2df33ac20de5aae18b14
parentfa44af7df1a96235fca2ec10c3129a4d2711ee28
[release-branch.go1.14] runtime: stop preemption during syscall.Exec on Darwin

On current macOS versions a program that receives a signal during an
execve can fail with a SIGILL signal. This appears to be a macOS
kernel bug. It has been reported to Apple.

This CL partially works around the problem by using execLock to not
send preemption signals during execve. Of course some other stray
signal could occur, but at least we can avoid exacerbating the problem.
We can't simply disable signals, as that would mean that the exec'ed
process would start with all signals blocked, which it likely does not
expect.

For #41702
Fixes #41703

Change-Id: I91b0add967b315671ddcf73269c4d30136e579b4
Reviewed-on: https://go-review.googlesource.com/c/go/+/262438
Trust: Ian Lance Taylor <iant@golang.org>
Run-TryBot: Ian Lance Taylor <iant@golang.org>
TryBot-Result: Go Bot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
(cherry picked from commit 64fb6ae95f1c322486cbfb758552bb8439a8e6e8)
Reviewed-on: https://go-review.googlesource.com/c/go/+/262737
src/runtime/signal_unix.go
src/syscall/exec_unix_test.go