]> Cypherpunks repositories - gostls13.git/commit
[release-branch.go1.15] 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:29 +0000 (21:38 +0000)
commit9c7eb68fc6d4bd8ab9a33bc5c1d89d263be1ab1b
tree2333dcb4841f1d716043c454a933e9acdb627624
parent1984ee00048b63eacd2155cd6d74a2d13e998272
[release-branch.go1.15] 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 #41704

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/+/262717
src/runtime/signal_unix.go
src/syscall/exec_unix_test.go