From cf9263dee1bb160f013a080bbda3532a7d35da15 Mon Sep 17 00:00:00 2001 From: qmuntal Date: Fri, 16 Dec 2022 16:54:03 +0100 Subject: runtime: factor out windows sigtramp This CL factors out part of the Windows sigtramp implementation, which was duplicated in all four architectures. The new common code is implemented in Go rather than in assembly, which will make Windows error handling easier to reason and maintain. While here, implement the control flow guard workaround on windows/386, which almost comes for free. Change-Id: I0bf38c28c54793225126e161bd95527a62de05e0 Reviewed-on: https://go-review.googlesource.com/c/go/+/458135 Run-TryBot: Quim Muntal Reviewed-by: Cherry Mui Reviewed-by: Alex Brainman TryBot-Result: Gopher Robot Reviewed-by: Bryan Mills Reviewed-by: Michael Pratt --- src/runtime/defs_windows.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/runtime/defs_windows.go') diff --git a/src/runtime/defs_windows.go b/src/runtime/defs_windows.go index 8d4e38120e..7e5d9570f8 100644 --- a/src/runtime/defs_windows.go +++ b/src/runtime/defs_windows.go @@ -57,6 +57,11 @@ type systeminfo struct { wprocessorrevision uint16 } +type exceptionpointers struct { + record *exceptionrecord + context *context +} + type exceptionrecord struct { exceptioncode uint32 exceptionflags uint32 -- cgit v1.3