Fix off-by-one error in stack delta lookup#185
Closed
umanwizard wants to merge 1 commit intomainfrom
Closed
Conversation
When the current address is a return address, we need to subtract one to get the real call instruction. Anecdotally, fixing this bug seems to substantially improve unwinding for Rust aarch64 binaries compiled in debug mode. The reason for this is that our heuristic for getting the frame pointer doesn't work in function epilogues, and in debug builds, you often have a call instruction immediately followed by the function epilogue. So due to this off-by-one error, we'll think we're in the epilogue and not correctly unwind the fp. It seems much less common in release builds, probably because it is much more unusual to have a call immediately followed by the function epilogue (because the optimizer will replace that sequence by a tail call).
a85879e to
0aaa538
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Cherry-pick of open-telemetry#1027 -- see there for PR description