Skip to content

[Linux][Backtracing] Fix a couple of backtracer issues. #67429

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

Merged
merged 2 commits into from
Jul 21, 2023

Conversation

al45tair
Copy link
Contributor

Fix the FramePointerUnwinder so it always returns nil after the it first stops iteration.

Fix line number processing so that we don't erroneously match regions between the end of one sequence and the start of the next.

rdar://112534548, rdar://112595022

al45tair added 2 commits July 20, 2023 15:32
On Linux specifically, it was possible for it to return `nil` to signal
the end of the unwind, then subsequently return non-`nil` again.  That
violates the expectations of the code layered above it, and can cause
an "Index out of range" error to occur.

rdar://112534548
The code that looks up line numbers wasn't respecting the end-sequence
flag, so it could "find" a line number between the end of one sequence
and the beginning of another.  That was wrong.

rdar://112595022
@al45tair al45tair requested review from ktoso and mikeash July 20, 2023 14:36
@al45tair
Copy link
Contributor Author

@swift-ci Please smoke test

@tomerd
Copy link
Contributor

tomerd commented Jul 20, 2023

shell we also cherry pick to 5.9 once merged?

Copy link
Contributor

@ktoso ktoso left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lgtm, please pick over to 5.9 :)

@ktoso ktoso merged commit ccc646e into swiftlang:main Jul 21, 2023
@al45tair
Copy link
Contributor Author

shell we also cherry pick to 5.9 once merged?

:-) I've already done that: #67430. Just needs a branch manager to approve it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants