From 65ea4c5021d44395db8728eea16eb8f7fc7420eb Mon Sep 17 00:00:00 2001 From: qmuntal Date: Thu, 9 Mar 2023 14:55:31 +0100 Subject: runtime: support GOTRACEBACK=wer on Windows GOTRACEBACK=wer is a new traceback level that acts as "crash" and also enables WER. The same effect can be achieved using debug.SetTraceback("wer"). The Go runtime currently crashes using exit(2), which bypasses WER even if it is enabled. To best way to trigger WER is calling RaiseFailFastException [1] instead, which internally launches the WER machinery. This CL also changes how GOTRACEBACK=crash crashes, so both "wer" and "crash" crash using RaiseFailFastException, which simplifies the implementation and resolves a longstanding TODO. Fixes #57441 Fixes #20498 [1] https://learn.microsoft.com/en-us/windows/win32/api/errhandlingapi/nf-errhandlingapi-raisefailfastexception Change-Id: I45669d619fbbd2f6413ce5e5f08425ed1d9aeb64 Reviewed-on: https://go-review.googlesource.com/c/go/+/474915 Reviewed-by: Davis Goodin TryBot-Result: Gopher Robot Reviewed-by: David Chase Reviewed-by: Than McIntosh Reviewed-by: Alex Brainman Run-TryBot: Quim Muntal --- src/runtime/export_windows_test.go | 1 - 1 file changed, 1 deletion(-) (limited to 'src/runtime/export_windows_test.go') diff --git a/src/runtime/export_windows_test.go b/src/runtime/export_windows_test.go index d4b1e1fad3..332136b586 100644 --- a/src/runtime/export_windows_test.go +++ b/src/runtime/export_windows_test.go @@ -11,7 +11,6 @@ import "unsafe" const MaxArgs = maxArgs var ( - TestingWER = &testingWER OsYield = osyield TimeBeginPeriodRetValue = &timeBeginPeriodRetValue ) -- cgit v1.3-5-g45d5