• Russ Cox's avatar
    runtime: use VEH, not SEH, for windows/386 exception handling · 3750904a
    Russ Cox authored
    Structured Exception Handling (SEH) was the first way to handle
    exceptions (memory faults, divides by zero) on Windows.
    The S might as well stand for "stack-based": the implementation
    interprets stack addresses in a few different ways, and it gets
    subtly confused by Go's management of stacks. It's also something
    that requires active maintenance during cgo switches, and we've
    had bugs in that maintenance in the past.
    
    We have recently come to believe that SEH cannot work with
    Go's stack usage. See http://golang.org/issue/7325 for details.
    
    Vectored Exception Handling (VEH) is more like a Unix signal
    handler: you set it once for the whole process and forget about it.
    
    This CL drops all the SEH code and replaces it with VEH code.
    Many special cases and 7 #ifdefs disappear.
    
    VEH was introduced in Windows XP, so Go on windows/386 will
    now require Windows XP or later. The previous requirement was
    Windows 2000 or later. Windows 2000 immediately preceded
    Windows XP, so Windows 2000 is the only affected version.
    Microsoft stopped supporting Windows 2000 in 2010.
    See http://golang.org/s/win2000-golang-nuts for details.
    
    Fixes #7325.
    
    LGTM=alex.brainman, r
    R=golang-codereviews, alex.brainman, stephen.gutekanst, dave
    CC=golang-codereviews, iant, r
    https://golang.org/cl/74790043
    3750904a
cgocall.c 9.19 KB