Skip to content
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

fix: Always generate .ra CFI on MIPS #612

Merged
merged 4 commits into from
Jul 15, 2022
Merged

fix: Always generate .ra CFI on MIPS #612

merged 4 commits into from
Jul 15, 2022

Conversation

Swatinem
Copy link
Member

this is just a hack so far, it needs to be cleaned up so its more reliable, and obviously should only be used when we are dealing with MIPS.

@codecov-commenter
Copy link

Codecov Report

Merging #612 (61e3e3a) into master (8c11b8a) will increase coverage by 0.05%.
The diff coverage is 94.59%.

❗ Current head 61e3e3a differs from pull request most recent head 3df29d9. Consider uploading reports for the commit 3df29d9 to get more accurate results

@@            Coverage Diff             @@
##           master     #612      +/-   ##
==========================================
+ Coverage   68.26%   68.32%   +0.05%     
==========================================
  Files          83       83              
  Lines       16434    16478      +44     
==========================================
+ Hits        11219    11258      +39     
- Misses       5215     5220       +5     

@loewenheim loewenheim marked this pull request as ready for review June 28, 2022 11:07
@loewenheim loewenheim requested a review from a team June 28, 2022 11:07
@loewenheim loewenheim changed the title WIP: fix: Always generate .ra CFI on MIPS fix: Always generate .ra CFI on MIPS Jun 28, 2022
@loewenheim
Copy link
Contributor

Context: both Breakpad and rust-minidump expect there to always be an unwind rule for the return address or they will reject the CFI. On MIPS, however, the DWARF doesn't always contain such a rule because the return address is simply saved in its own register. rust-minidump/rust-minidump#583 (comment) suggests several ways to deal with this problem; this PR implements option 3.

@Swatinem
Copy link
Member Author

Now that our stackwalker does reasonably work, I tried again with and without this default, and in the very limited test data that I have, indeed the context frames are the ones that have CFI (and potentially a stack frame), but no .ra.

@Swatinem Swatinem merged commit 422dac8 into master Jul 15, 2022
@Swatinem Swatinem deleted the fix/mips-cfi branch July 15, 2022 12:09
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.

3 participants