aboutsummaryrefslogtreecommitdiff
path: root/src/encoding/binary/binary.go
diff options
context:
space:
mode:
authorCherry Zhang <cherryyz@google.com>2019-11-07 22:40:50 -0500
committerCherry Zhang <cherryyz@google.com>2019-11-08 16:46:24 +0000
commit47232f0d929bd7ca44aeea23ad3f1806dfa55c5e (patch)
tree891fe47834242f0686f834586c49d45b7501c68c /src/encoding/binary/binary.go
parent374c2847f9c03da7365bfb78e5ef96a0cb837656 (diff)
downloadgo-47232f0d929bd7ca44aeea23ad3f1806dfa55c5e.tar.xz
cmd/internal/obj/arm64: make function epilogue async-signal safe
When the frame size is large, we generate MOVD.P 0xf0(SP), LR ADD $(framesize-0xf0), SP This is problematic: after the first instruction, we have a partial frame of size (framesize-0xf0). If we try to unwind the stack at this point, we'll try to read the LR from the stack at 0(SP) (the new SP) as the frame size is not 0. But this slot does not contain a valid LR. Fix this by not changing SP in two instructions. Instead, generate MOVD (SP), LR ADD $framesize, SP This affects not only async preemption but also profiling. So we change the generated instructions, instead of marking unsafe point. Change-Id: I4e78c62d50ffc4acff70ccfbfec16a5ccae17f24 Reviewed-on: https://go-review.googlesource.com/c/go/+/206057 Run-TryBot: Cherry Zhang <cherryyz@google.com> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Ian Lance Taylor <iant@golang.org>
Diffstat (limited to 'src/encoding/binary/binary.go')
0 files changed, 0 insertions, 0 deletions