]> Cypherpunks repositories - gostls13.git/commit
runtime: don't enable notes (=signals) too early in Plan 9
authorRichard Miller <miller.research@gmail.com>
Mon, 18 May 2020 08:34:17 +0000 (09:34 +0100)
committerDavid du Colombier <0intro@gmail.com>
Mon, 18 May 2020 09:13:38 +0000 (09:13 +0000)
commitbb59a1360a9e6c2d32a59461da56e9bc3a5703ef
tree8fd200e46f627755ace46f9049da9111be560a2b
parent2b70ffe9307c0992e28513ba25081d767b5937b2
runtime: don't enable notes (=signals) too early in Plan 9

The Plan 9 runtime startup was enabling notes (like Unix signals)
before the gsignal stack was allocated. This left a small window
of time where an interrupt (eg by the parent killing a subprocess
quickly after exec) would cause a null pointer dereference in
sigtramp. This would leave the interrupted process suspended in
'broken' state instead of exiting. We've observed this on the
builders, where it can make a test time out waiting for the broken
process to terminate.

Updates #38772

Change-Id: I54584069fd3109595f06c78724c1f6419e028aab
Reviewed-on: https://go-review.googlesource.com/c/go/+/234397
Run-TryBot: David du Colombier <0intro@gmail.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: David du Colombier <0intro@gmail.com>
src/runtime/os_plan9.go