aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2021-08-18 20:30:39 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2021-08-18 20:38:24 +0200
commit349bc83693109e2ea9eea6c5722a50041494fdbb (patch)
tree26884ab5bce7aa9a066afdfc73687a49508ccacd
parentembeddable-dll-service: csharp: fix type conversions (diff)
downloadwireguard-windows-349bc83693109e2ea9eea6c5722a50041494fdbb.tar.xz
wireguard-windows-349bc83693109e2ea9eea6c5722a50041494fdbb.zip
build: bump to go 1.17
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
-rw-r--r--Makefile2
-rw-r--r--build.bat2
-rw-r--r--go-patches/0002-runtime-allow-arm64-SEH-to-be-called-if-illegal-inst.patch47
3 files changed, 2 insertions, 49 deletions
diff --git a/Makefile b/Makefile
index b95ebd8f..ce6fa50c 100644
--- a/Makefile
+++ b/Makefile
@@ -25,7 +25,7 @@ define download =
if ! mv $$@.unverified $$@; then rm -f $$@.unverified; exit 1; fi
endef
-$(eval $(call download,go.tar.gz,https://golang.org/dl/go1.17rc1.linux-amd64.tar.gz,bfbd3881a01ca3826777b1c40f241acacd45b14730d373259cd673d74e15e534))
+$(eval $(call download,go.tar.gz,https://golang.org/dl/go1.17.linux-amd64.tar.gz,6bf89fc4f5ad763871cf7eac80a2d594492de7a818303283f1366a7f6a30372d))
$(eval $(call download,wintun.zip,https://www.wintun.net/builds/wintun-0.13.zip,34afe7d0de1fdb781af3defc0a75fd8c97daa756279b42dd6be6a1bd8ccdc7f0))
$(eval $(call download,wireguard-nt.zip,https://download.wireguard.com/wireguard-nt/wireguard-nt-0.4.zip,f2d9784dcf4c1920a71b1c3af332b55debdbafc6cbcf89cbefb6be8b0f1a5465))
diff --git a/build.bat b/build.bat
index 092b13f0..d36d32de 100644
--- a/build.bat
+++ b/build.bat
@@ -13,7 +13,7 @@ if exist .deps\prepared goto :render
rmdir /s /q .deps 2> NUL
mkdir .deps || goto :error
cd .deps || goto :error
- call :download go.zip https://golang.org/dl/go1.17rc1.windows-amd64.zip 9f5303e420fdaf4ddea09a627726dec55914e151be473f7d206247f93732a976 || goto :error
+ call :download go.zip https://golang.org/dl/go1.17.windows-amd64.zip 2a18bd65583e221be8b9b7c2fbe3696c40f6e27c2df689bbdcc939d49651d151 || goto :error
rem Mirror of https://github.com/mstorsjo/llvm-mingw/releases/download/20201020/llvm-mingw-20201020-msvcrt-x86_64.zip
call :download llvm-mingw-msvcrt.zip https://download.wireguard.com/windows-toolchain/distfiles/llvm-mingw-20201020-msvcrt-x86_64.zip 2e46593245090df96d15e360e092f0b62b97e93866e0162dca7f93b16722b844 || goto :error
rem Mirror of https://imagemagick.org/download/binaries/ImageMagick-7.0.8-42-portable-Q16-x64.zip
diff --git a/go-patches/0002-runtime-allow-arm64-SEH-to-be-called-if-illegal-inst.patch b/go-patches/0002-runtime-allow-arm64-SEH-to-be-called-if-illegal-inst.patch
deleted file mode 100644
index 3537f493..00000000
--- a/go-patches/0002-runtime-allow-arm64-SEH-to-be-called-if-illegal-inst.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: "Jason A. Donenfeld" <Jason@zx2c4.com>
-Date: Thu, 5 Aug 2021 13:37:29 +0200
-Subject: [PATCH] runtime: allow arm64 SEH to be called if illegal instruction
-
-DLLs built with recent Microsoft toolchains for ARM64 test for ARMv8.1
-atomics by potentially calling an illegal instruction, and then trapping
-the exception to disable use of them by way of a structured exception
-handler. However, vectored exception handlers are always called before
-structured exception handlers. When LoadLibrary-ing DLLs that do this
-probing during initialization, our lastcontinuehandler winds up being
-called, and then crashing, but actually it should give execution back to
-the library to handle the exception and fix up the state. So special
-case this for arm64 with illegal instructions, and hope that we're not
-masking other things in external DLLs that might more fatally trigger an
-illegal instruction exception.
-
-Change-Id: I341ab99cd8d513ae999b75596749d49779072022
----
- src/runtime/signal_windows.go | 11 +++++++++++
- 1 file changed, 11 insertions(+)
-
-diff --git a/src/runtime/signal_windows.go b/src/runtime/signal_windows.go
-index f2ce24d735..b720ddcf16 100644
---- a/src/runtime/signal_windows.go
-+++ b/src/runtime/signal_windows.go
-@@ -183,6 +183,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
- }
---
-2.32.0
-