diff options
author | Austin Clements <austin@google.com> | 2018-03-09 16:12:40 -0500 |
---|---|---|
committer | Austin Clements <austin@google.com> | 2018-03-09 22:17:04 +0000 |
commit | 0def0f2e993111308a114bb83604618f218b7c3d (patch) | |
tree | b7a8044f9062d169e9c7ea1cc0315a0701546899 /src/runtime/asm_arm64.s | |
parent | e4de522c95d49d943b99740aa4a1361357dcf869 (diff) | |
download | go-0def0f2e993111308a114bb83604618f218b7c3d.tar.gz go-0def0f2e993111308a114bb83604618f218b7c3d.zip |
runtime: fix abort handling on arm64
The implementation of runtime.abort on arm64 currently branches to
address 0, which results in a signal from PC 0, rather than from
runtime.abort, so the runtime fails to recognize it as an abort.
Fix runtime.abort on arm64 to read from address 0 like what other
architectures do and recognize this in the signal handler.
Should fix the linux/arm64 build.
Change-Id: I960ab630daaeadc9190287604d4d8337b1ea3853
Reviewed-on: https://go-review.googlesource.com/99895
Run-TryBot: Austin Clements <austin@google.com>
TryBot-Result: Gobot Gobot <gobot@golang.org>
Reviewed-by: Cherry Zhang <cherryyz@google.com>
Diffstat (limited to 'src/runtime/asm_arm64.s')
-rw-r--r-- | src/runtime/asm_arm64.s | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/runtime/asm_arm64.s b/src/runtime/asm_arm64.s index e88532728a..2b39d2ec72 100644 --- a/src/runtime/asm_arm64.s +++ b/src/runtime/asm_arm64.s @@ -710,7 +710,8 @@ TEXT runtime·getcallerpc(SB),NOSPLIT|NOFRAME,$0-8 RET TEXT runtime·abort(SB),NOSPLIT|NOFRAME,$0-0 - B (ZR) + MOVD ZR, R0 + MOVD (R0), R0 UNDEF TEXT runtime·return0(SB), NOSPLIT, $0 |