]> Cypherpunks repositories - gostls13.git/commit
runtime: fix bp restoration in panic recovery for arm64
authorMichael Anthony Knyszek <mknyszek@google.com>
Mon, 28 Aug 2023 19:26:46 +0000 (19:26 +0000)
committerMichael Knyszek <mknyszek@google.com>
Mon, 28 Aug 2023 21:36:31 +0000 (21:36 +0000)
commitf7a87e32997345b7acaabbf725d1b210e1cfe327
tree64e3aa1d3c1cd9bd5a7ad6dfb15b8fb5848d786b
parent38db2df02dbe1edbdb586118d16ebdbf20180a95
runtime: fix bp restoration in panic recovery for arm64

Previously, the frame pointer wouldn't be restored at all, which could
cause panics during frame pointer unwinding. As of CL 516157, the frame
pointer is restored, but it's restored incorrectly on arm64: on arm64,
the frame pointer points one word below SP, but here it's one below
panic.fp which is the stack pointer of the caller's frame (nothing to do
with the architectural bp).

For #61766.

Change-Id: I86504b85a4d741df5939b51c914d9e7c8d6edaad
Reviewed-on: https://go-review.googlesource.com/c/go/+/523697
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Cherry Mui <cherryyz@google.com>
Run-TryBot: Michael Knyszek <mknyszek@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
src/runtime/callers_test.go
src/runtime/panic.go