diff options
| author | Cherry Mui <cherryyz@google.com> | 2023-11-20 16:33:29 -0500 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2023-11-21 02:06:54 +0000 |
| commit | dc094f9c9613a2a8ed24ace1b5416170aa3a334b (patch) | |
| tree | 71c099bac69b78f38581fbb29a74619213289bf6 /src/runtime/proc.go | |
| parent | 195c88b202695e90b2ff41b3f1a03bc19685baa6 (diff) | |
| download | go-dc094f9c9613a2a8ed24ace1b5416170aa3a334b.tar.xz | |
runtime: disable crash stack on Windows
Apparently, on Windows, throwing an exception on a non-system-
allocated crash stack causes EXCEPTION_STACK_OVERFLOW and hangs
the process (see issue #63938). Disable crash stack for now, which
gets us back the the behavior of Go 1.21.
Fixes #63938.
Change-Id: I4c090315b93b484e756b242f0de7a9e02f199261
Reviewed-on: https://go-review.googlesource.com/c/go/+/543996
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Quim Muntal <quimmuntal@gmail.com>
Diffstat (limited to 'src/runtime/proc.go')
| -rw-r--r-- | src/runtime/proc.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/runtime/proc.go b/src/runtime/proc.go index 18826abb06..edf692fd1a 100644 --- a/src/runtime/proc.go +++ b/src/runtime/proc.go @@ -576,7 +576,10 @@ func switchToCrashStack(fn func()) { abort() } -const crashStackImplemented = GOARCH == "amd64" || GOARCH == "arm64" || GOARCH == "mips64" || GOARCH == "mips64le" || GOARCH == "ppc64" || GOARCH == "ppc64le" || GOARCH == "riscv64" || GOARCH == "wasm" +// Disable crash stack on Windows for now. Apparently, throwing an exception +// on a non-system-allocated crash stack causes EXCEPTION_STACK_OVERFLOW and +// hangs the process (see issue 63938). +const crashStackImplemented = (GOARCH == "amd64" || GOARCH == "arm64" || GOARCH == "mips64" || GOARCH == "mips64le" || GOARCH == "ppc64" || GOARCH == "ppc64le" || GOARCH == "riscv64" || GOARCH == "wasm") && GOOS != "windows" //go:noescape func switchToCrashStack0(fn func()) // in assembly |
