aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/noder
diff options
context:
space:
mode:
authorNick Ripley <nick.ripley@datadoghq.com>2024-02-05 14:20:10 -0500
committerGopher Robot <gobot@golang.org>2024-02-27 20:11:27 +0000
commit234390e741dd43b1ce54b0cfd91dc591c0b190f7 (patch)
tree72d27fa9003f1754b087822cb887bde45fe8afd2 /src/cmd/compile/internal/noder
parenta6a5c30d2b1338a8445de2499fbe7e9dda103efb (diff)
downloadgo-234390e741dd43b1ce54b0cfd91dc591c0b190f7.tar.xz
runtime: don't clobber saved frame pointer during arm64 racecall
During calls to the race detector on arm64, we switch to the g0 stack if we aren't already on it. If we are already on the g0 stack, the race detector library code can then create a stack frame using the stack pointer coming from Go code. The race detector library can go on to write values to the top of its stack frame. But the Go ABI for arm64 saves the caller's frame pointer in the word below the current stack frame. So, the saved frame pointer on the stack can be clobbered by the race detector. Decrement the stack pointer to account for where the frame pointer is saved, like we do for asmcgocall. Change-Id: I66e5e4a671c3befc10776bac6869810ecf71790d Reviewed-on: https://go-review.googlesource.com/c/go/+/561515 LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com> Reviewed-by: Keith Randall <khr@golang.org> Auto-Submit: Keith Randall <khr@google.com> Reviewed-by: Keith Randall <khr@google.com> Reviewed-by: Michael Knyszek <mknyszek@google.com>
Diffstat (limited to 'src/cmd/compile/internal/noder')
0 files changed, 0 insertions, 0 deletions