diff options
| author | Cherry Mui <cherryyz@google.com> | 2021-06-03 12:26:18 -0400 |
|---|---|---|
| committer | Cherry Mui <cherryyz@google.com> | 2021-06-03 20:00:56 +0000 |
| commit | 55b4310acdbd7bc7253936c44a845a98d82eaae7 (patch) | |
| tree | e5a65c782761c79ec88d6e4dd8674d467856cc6d /src/runtime/mbitmap.go | |
| parent | 6b1e4430bb79674ff523240608f106a1aeb7302e (diff) | |
| download | go-55b4310acdbd7bc7253936c44a845a98d82eaae7.tar.xz | |
[dev.typeparams] runtime: crash the GC at clobberdead pointer on ARM64
Extend CL 310330 to ARM64, which now has clobberdead mode
implemented in the compiler.
Change-Id: I07f6951d81a0797ef7a74e48b79db5cea2bf876b
Reviewed-on: https://go-review.googlesource.com/c/go/+/324766
Trust: Cherry Mui <cherryyz@google.com>
Run-TryBot: Cherry Mui <cherryyz@google.com>
Reviewed-by: Michael Knyszek <mknyszek@google.com>
TryBot-Result: Go Bot <gobot@golang.org>
Diffstat (limited to 'src/runtime/mbitmap.go')
| -rw-r--r-- | src/runtime/mbitmap.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/runtime/mbitmap.go b/src/runtime/mbitmap.go index 32b8db7a50..819acf40bd 100644 --- a/src/runtime/mbitmap.go +++ b/src/runtime/mbitmap.go @@ -386,10 +386,10 @@ func findObject(p, refBase, refOff uintptr) (base uintptr, s *mspan, objIndex ui // If s is nil, the virtual address has never been part of the heap. // This pointer may be to some mmap'd region, so we allow it. if s == nil { - if GOARCH == "amd64" && p == clobberdeadPtr && debug.invalidptr != 0 { - // Crash if clobberdeadPtr is seen. Only on AMD64 for now, as - // it is the only platform where compiler's clobberdead mode is - // implemented. On AMD64 clobberdeadPtr cannot be a valid address. + if (GOARCH == "amd64" || GOARCH == "arm64") && p == clobberdeadPtr && debug.invalidptr != 0 { + // Crash if clobberdeadPtr is seen. Only on AMD64 and ARM64 for now, + // as they are the only platform where compiler's clobberdead mode is + // implemented. On these platforms clobberdeadPtr cannot be a valid address. badPointer(s, p, refBase, refOff) } return |
