• Austin Clements's avatar
    runtime: fix abort handling on Windows · 7001ac53
    Austin Clements authored
    On Windows, the IP recorded in the breakpoint exception caused by
    runtime.abort is actually one byte after the INT3, unlike on UNIX
    OSes. Account for this in isgoexception.
    
    It turns out TestAbort was "passing" on Windows anyway because abort
    still caused a fatal panic, just not the one we were expecting. This
    CL tightens this test to check that the runtime specifically reports a
    breakpoint exception.
    
    Fixing this is related to #21382, since we use runtime.abort in
    reporting g0 stack overflows, and it's important that we detect this
    and not try to handle it.
    
    Change-Id: I66120944d138eb80f839346b157a3759c1019e34
    Reviewed-on: https://go-review.googlesource.com/122515
    Run-TryBot: Austin Clements <austin@google.com>
    TryBot-Result: Gobot Gobot <gobot@golang.org>
    Reviewed-by: default avatarIan Lance Taylor <iant@golang.org>
    Reviewed-by: default avatarAlex Brainman <alex.brainman@gmail.com>
    7001ac53
signal_windows.go 6.43 KB