aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMauri de Souza Meneguzzo <mauri870@gmail.com>2024-05-06 12:21:37 +0000
committerCherry Mui <cherryyz@google.com>2024-05-16 21:49:14 +0000
commitc89318667f525b1e796fca991ce92a1529aba81c (patch)
tree4e680d3f4d2540c62194857fab527654e6d0df68 /src
parent036e93ba7631bb12844f01078979e761144f227f (diff)
downloadgo-c89318667f525b1e796fca991ce92a1529aba81c.tar.gz
go-c89318667f525b1e796fca991ce92a1529aba81c.zip
runtime: cleanup crashstack code
This patch removes redundant guards for the crash stack feature, as all supported Go architectures now have a crash stack implementation. Change-Id: I7ffb61c57955778d687073418130b2aaab0ff183 GitHub-Last-Rev: 6ff56d6420093ee8f95c75019557dc8bcec32ed7 GitHub-Pull-Request: golang/go#67202 Reviewed-on: https://go-review.googlesource.com/c/go/+/583416 TryBot-Result: Gopher Robot <gobot@golang.org> Reviewed-by: Cherry Mui <cherryyz@google.com> LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Dmitri Shuralyov <dmitshur@google.com> Run-TryBot: Mauri de Souza Meneguzzo <mauri870@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/runtime/asm.s31
-rw-r--r--src/runtime/proc.go2
2 files changed, 1 insertions, 32 deletions
diff --git a/src/runtime/asm.s b/src/runtime/asm.s
index b4bcb04cd1..f487e44100 100644
--- a/src/runtime/asm.s
+++ b/src/runtime/asm.s
@@ -13,34 +13,3 @@ TEXT ·sigpanic0(SB),NOSPLIT,$0-0
TEXT ·mapinitnoop<ABIInternal>(SB),NOSPLIT,$0-0
RET
-#ifndef GOARCH_386
-#ifndef GOARCH_arm
-#ifndef GOARCH_amd64
-#ifndef GOARCH_arm64
-#ifndef GOARCH_loong64
-#ifndef GOARCH_mips
-#ifndef GOARCH_mipsle
-#ifndef GOARCH_mips64
-#ifndef GOARCH_mips64le
-#ifndef GOARCH_ppc64
-#ifndef GOARCH_ppc64le
-#ifndef GOARCH_riscv64
-#ifndef GOARCH_s390x
-#ifndef GOARCH_wasm
-// stub to appease shared build mode.
-TEXT ·switchToCrashStack0<ABIInternal>(SB),NOSPLIT,$0-0
- UNDEF
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
-#endif
diff --git a/src/runtime/proc.go b/src/runtime/proc.go
index 13a8d70186..140f06d03d 100644
--- a/src/runtime/proc.go
+++ b/src/runtime/proc.go
@@ -578,7 +578,7 @@ func switchToCrashStack(fn func()) {
// 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 == "386" || GOARCH == "amd64" || GOARCH == "arm" || GOARCH == "arm64" || GOARCH == "loong64" || GOARCH == "mips" || GOARCH == "mipsle" || GOARCH == "mips64" || GOARCH == "mips64le" || GOARCH == "ppc64" || GOARCH == "ppc64le" || GOARCH == "riscv64" || GOARCH == "s390x" || GOARCH == "wasm") && GOOS != "windows"
+const crashStackImplemented = GOOS != "windows"
//go:noescape
func switchToCrashStack0(fn func()) // in assembly