aboutsummaryrefslogtreecommitdiff
path: root/src/runtime/debug
diff options
context:
space:
mode:
authorKeith Randall <khr@golang.org>2020-09-18 13:01:54 -0700
committerKeith Randall <khr@golang.org>2020-09-18 22:09:45 +0000
commit4c4a376736fff47b08ab6053605c3b68d87552b5 (patch)
tree5c6adb8f0c884e15fb058b12aee8596210afd835 /src/runtime/debug
parent8925290cf701fc8f7ec95e4df3d6a8d423b26780 (diff)
downloadgo-4c4a376736fff47b08ab6053605c3b68d87552b5.tar.gz
go-4c4a376736fff47b08ab6053605c3b68d87552b5.zip
runtime/debug: skip fault address test on unsupported platforms
Change-Id: I6a6fe616365fa542218fbc9ff61805ff70a1ef63 Reviewed-on: https://go-review.googlesource.com/c/go/+/255999 Run-TryBot: Keith Randall <khr@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Bryan C. Mills <bcmills@google.com> Trust: Keith Randall <khr@golang.org>
Diffstat (limited to 'src/runtime/debug')
-rw-r--r--src/runtime/debug/panic_test.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/runtime/debug/panic_test.go b/src/runtime/debug/panic_test.go
index 2aad418bae..4b7830e100 100644
--- a/src/runtime/debug/panic_test.go
+++ b/src/runtime/debug/panic_test.go
@@ -9,6 +9,7 @@
package debug_test
import (
+ "runtime"
"runtime/debug"
"syscall"
"testing"
@@ -16,6 +17,12 @@ import (
)
func TestPanicOnFault(t *testing.T) {
+ if runtime.GOARCH == "s390x" {
+ t.Skip("s390x fault addresses are missing the low order bits")
+ }
+ if runtime.GOOS == "darwin" && runtime.GOARCH == "arm64" {
+ t.Skip("darwin/arm64 doesn't provide fault addresses")
+ }
m, err := syscall.Mmap(-1, 0, 0x1000, syscall.PROT_READ /* Note: no PROT_WRITE */, syscall.MAP_SHARED|syscall.MAP_ANON)
if err != nil {
t.Fatalf("can't map anonymous memory: %s", err)