diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-27 22:21:11 +0100 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2020-11-27 22:21:11 +0100 |
commit | 3bb59485ef68f8656cd49d2c4e97add05a35f8ee (patch) | |
tree | f19f956d9a5cdf9ae910cc2eaa024c5f30c1098d /go-patches/0012-runtime-adjust-address-calculation-in-identifying-ab.patch | |
parent | version: bump (diff) | |
download | wireguard-windows-3bb59485ef68f8656cd49d2c4e97add05a35f8ee.tar.xz wireguard-windows-3bb59485ef68f8656cd49d2c4e97add05a35f8ee.zip |
go-patches: fix isAbort calculation on arm
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to '')
-rw-r--r-- | go-patches/0012-runtime-adjust-address-calculation-in-identifying-ab.patch | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/go-patches/0012-runtime-adjust-address-calculation-in-identifying-ab.patch b/go-patches/0012-runtime-adjust-address-calculation-in-identifying-ab.patch new file mode 100644 index 00000000..f0e60ad6 --- /dev/null +++ b/go-patches/0012-runtime-adjust-address-calculation-in-identifying-ab.patch @@ -0,0 +1,44 @@ +From 8ec41fee1e6ef074ef74e56fe079c70c8a1d0548 Mon Sep 17 00:00:00 2001 +From: "Jason A. Donenfeld" <Jason@zx2c4.com> +Date: Fri, 27 Nov 2020 22:07:23 +0100 +Subject: [PATCH 12/12] runtime: adjust address calculation in identifying + abort on windows/arm + +Apparently we're being called on arm 1 byte off, just like on 386 and +amd64, so unify the handler for isAbortPC. + +Fixes #42859. +Updates #29050. + +Change-Id: I97fffeb4a33d93ca3397ce1c9ba2b05137f391ca +--- + src/runtime/signal_windows.go | 13 +++---------- + 1 file changed, 3 insertions(+), 10 deletions(-) + +diff --git a/src/runtime/signal_windows.go b/src/runtime/signal_windows.go +index d123276d3e..8db24fb805 100644 +--- a/src/runtime/signal_windows.go ++++ b/src/runtime/signal_windows.go +@@ -43,16 +43,9 @@ func initExceptionHandler() { + // + //go:nosplit + func isAbort(r *context) bool { +- switch GOARCH { +- case "386", "amd64": +- // In the case of an abort, the exception IP is one byte after +- // the INT3 (this differs from UNIX OSes). +- return isAbortPC(r.ip() - 1) +- case "arm": +- return isAbortPC(r.ip()) +- default: +- return false +- } ++ // In the case of an abort, the exception IP is one byte after ++ // the INT3 (this differs from UNIX OSes). ++ return isAbortPC(r.ip() - 1) + } + + // isgoexception reports whether this exception should be translated +-- +2.29.2 + |