rust-minidump / rust-minidump

Type definitions, parsing, and analysis for the minidump file format.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Check for call instructions when unwinding

jrmuizel opened this issue · comments

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

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

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.

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.)