-
Notifications
You must be signed in to change notification settings - Fork 18k
runtime/trace: segfault in runtime.fpTracebackPCs during deferred call after recovering from panic [1.21 backport] #62046
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I said "fairly safe" but I meant "safe". I should not have qualified that. |
Change https://go.dev/cl/519656 mentions this issue: |
Approved as this is a serious issue without a workaround. |
@mknyszek can you please resolve the issues on the CL? |
On it. Sorry for the delay. |
Change https://go.dev/cl/523698 mentions this issue: |
…recovering from panic When recovering from a panic, restore the caller's frame pointer before returning control to the caller. Otherwise, if the function proceeds to run more deferred calls before returning, the deferred functions will get invalid frame pointers pointing to an address lower in the stack. This can cause frame pointer unwinding to crash, such as if an execution trace event is recorded during the deferred call on architectures which support frame pointer unwinding. Original CL by Nick Ripley, includes fix from CL 523697, and includes a test update from CL 524315. This CL also deviates from the original fix by doing some extra computation to figure out the fp from the sp, since we don't have the fp immediately available to us in `recovery` on the Go 1.21 branch, and it would probably be complicated to plumb that through its caller. For #61766 Fixes #62046 Change-Id: I5a99ca4f909f6b6e209a330d595d1c99987d4359 Reviewed-on: https://go-review.googlesource.com/c/go/+/523698 LUCI-TryBot-Result: Go LUCI <[email protected]> Auto-Submit: Dmitri Shuralyov <[email protected]> Reviewed-by: Cherry Mui <[email protected]>
Closed by merging 8dc6ad1 to release-branch.go1.21. |
@mknyszek requested issue #61766 to be considered for backport to the next 1.21 minor release.
The text was updated successfully, but these errors were encountered: