mirror of
https://github.com/golang/go.git
synced 2025-05-05 15:43:04 +00:00
runtime: adjust address calculation in identifying abort on windows/arm
Apparently we're being called on arm 1 byte off, just like on 386 and amd64, so unify the handler for isAbortPC. Fixes #42859. Updates #29050. Change-Id: I97fffeb4a33d93ca3397ce1c9ba2b05137f391ca Reviewed-on: https://go-review.googlesource.com/c/go/+/273727 Run-TryBot: Jason A. Donenfeld <Jason@zx2c4.com> Reviewed-by: Alex Brainman <alex.brainman@gmail.com> Trust: Alex Brainman <alex.brainman@gmail.com> Trust: Jason A. Donenfeld <Jason@zx2c4.com>
This commit is contained in:
parent
91f77ca2f8
commit
0252cfd84d
@ -43,16 +43,9 @@ func initExceptionHandler() {
|
||||
//
|
||||
//go:nosplit
|
||||
func isAbort(r *context) bool {
|
||||
switch GOARCH {
|
||||
case "386", "amd64":
|
||||
// In the case of an abort, the exception IP is one byte after
|
||||
// the INT3 (this differs from UNIX OSes).
|
||||
return isAbortPC(r.ip() - 1)
|
||||
case "arm":
|
||||
return isAbortPC(r.ip())
|
||||
default:
|
||||
return false
|
||||
}
|
||||
// In the case of an abort, the exception IP is one byte after
|
||||
// the INT3 (this differs from UNIX OSes).
|
||||
return isAbortPC(r.ip() - 1)
|
||||
}
|
||||
|
||||
// isgoexception reports whether this exception should be translated
|
||||
|
Loading…
x
Reference in New Issue
Block a user