diff options
author | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-08-12 20:22:27 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2021-08-12 20:22:27 +0000 |
commit | 4d3cc84774549d26e52cbba3a0ffc50d3ede80d5 (patch) | |
tree | de3466e3b835e2c18fa03548ddf0619f5555575b /src/runtime/signal_windows.go | |
parent | 7e9f911ec4fd08ce9b4296f0aea4864b53064573 (diff) | |
parent | a64ab8d3ecb38e10007e136edc9dc3abde873e1e (diff) | |
download | go-4d3cc84774549d26e52cbba3a0ffc50d3ede80d5.tar.gz go-4d3cc84774549d26e52cbba3a0ffc50d3ede80d5.zip |
Merge "[dev.typeparams] all: merge master (46fd547) into dev.typeparams" into dev.typeparamsdev.typeparams
Diffstat (limited to 'src/runtime/signal_windows.go')
-rw-r--r-- | src/runtime/signal_windows.go | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/runtime/signal_windows.go b/src/runtime/signal_windows.go index af15709a4a..3fe352ef57 100644 --- a/src/runtime/signal_windows.go +++ b/src/runtime/signal_windows.go @@ -184,6 +184,17 @@ func lastcontinuehandler(info *exceptionrecord, r *context, gp *g) int32 { return _EXCEPTION_CONTINUE_SEARCH } + // VEH is called before SEH, but arm64 MSVC DLLs use SEH to trap + // illegal instructions during runtime initialization to determine + // CPU features, so if we make it to the last handler and we're + // arm64 and it's an illegal instruction and this is coming from + // non-Go code, then assume it's this runtime probing happen, and + // pass that onward to SEH. + if GOARCH == "arm64" && info.exceptioncode == _EXCEPTION_ILLEGAL_INSTRUCTION && + (r.ip() < firstmoduledata.text || firstmoduledata.etext < r.ip()) { + return _EXCEPTION_CONTINUE_SEARCH + } + winthrow(info, r, gp) return 0 // not reached } |