• Austin Clements's avatar
    runtime: ensure abort actually crashes the process · 60a9e5d6
    Austin Clements authored
    On all non-x86 arches, runtime.abort simply reads from nil.
    Unfortunately, if this happens on a user stack, the signal handler
    will dutifully turn this into a panicmem, which lets user defers run
    and which user code can even recover from.
    
    To fix this, add an explicit check to the signal handler that turns
    faults in abort into hard crashes directly in the signal handler. This
    has the added benefit of giving a register dump at the abort point.
    
    Change-Id: If26a7f13790745ee3867db7f53b72d8281176d70
    Reviewed-on: https://go-review.googlesource.com/93661
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: 's avatarKeith Randall <khr@golang.org>
    60a9e5d6
os3_plan9.go 4.04 KB