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

Check for call instructions when unwinding #738

Open
jrmuizel opened this issue Nov 22, 2022 · 3 comments
Open

Check for call instructions when unwinding #738

jrmuizel opened this issue Nov 22, 2022 · 3 comments

Comments

@jrmuizel
Copy link
Contributor

When possible we should verify that return addresses that we see on the stack are proceeded by call instructions. That would help with unwinding crashes like those in https://bugzilla.mozilla.org/show_bug.cgi?id=1747821

@jrmuizel
Copy link
Contributor Author

I'm pretty sure that windbg does this kind of check.

@gabrielesvelto
Copy link
Collaborator

We might not have the memory containing the calling instruction in a minidump so it won't be always possible, but when we have it checking shouldn't be hard now that we have bundled a disassembler with the rest of the crate.

@luser
Copy link
Collaborator

luser commented Dec 1, 2022

You'll pretty much never have that info since the stackwalker doesn't load the associated binaries. That's not infeasible to implement, it's just extra work that the system doesn't currently do.

I wonder how efficiently we could build a table that provided the offsets of all call instructions within each function when dumping symbols? If the stackwalker had that data it would be able to make these determinations. (That wouldn't help with JITted code or modules without symbols, obviously.)

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

No branches or pull requests

3 participants