-
-
Notifications
You must be signed in to change notification settings - Fork 78
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: Make the Win-x64 CFI code more faithful #549
Conversation
@loewenheim I double-checked the |
I couldn't dig too deep but here's my results from testing on one of our crashes. The old stack trace looked like this:
The new one looks like this:
Visual studio reports this stack:
Note how we're walking |
@gabrielesvelto thanks for having a look at this! |
That's a very good point. Before your patch the directives for
With your patch applied they become:
So I had an idea, and I copy-pasted the old CFI directives for
Bam! Full stack! So, your changes are doing the right thing for |
Oh, looks like I had a very hard to spot typo in there, lol. (notice the missing Lets try now ;-) |
Codecov Report
@@ Coverage Diff @@
## master #549 +/- ##
==========================================
- Coverage 66.87% 66.83% -0.05%
==========================================
Files 101 101
Lines 18840 18884 +44
==========================================
+ Hits 12600 12621 +21
- Misses 6240 6263 +23 |
It's working fine! There's differences in the contents of other registers but the stack trace is exactly what it's supposed to be. If I have some time I'll compare the register contents with what Visual Studio gets but in the meantime this looks ready to land. |
Do you have a plans to do a release that include this change soon? |
Sorry for the delay, we had some automation issues. Anyhow, we managed to release |
Thanks! |
This is trying to fix #546 by more faithfully implementing Win-x64 unwinding, specifically:
It restores all the registers that were saved, and adds support for FP-based unwinding.
I’m still struggling to make this code work correctly with
RtlDispatchException
which we somehow still can’t unwind through.