Of course it won't work in edge cases like handwritten Asm that uses the stack in more clever ways, but when you're dealing with compiler output, it'll be fine. No need for all this complexity, and works in almost all cases.
Of course it won't work in edge cases like handwritten Asm that uses the stack in more clever ways, but when you're dealing with compiler output, it'll be fine. No need for all this complexity, and works in almost all cases.
If it's a graph of potential stacks, though, wouldn't you eventually find the one that unwinds, if one exists?
Since we do post-hoc stack walking our ability to actually look at the assembly is limited. In most cases where we have no CFI we also do not have the binary to begin with, so we're in random memory land.
I'm not familiar with Rust, but if I'm reading it correctly, you're not doing back-disassembly and only checking if an address on the stack is in a code region, which certainly won't work well.
we also do not have the binary to begin with
Your "minidumps" only contain the stack?
I linked you to it elsewhere in this thread. Sentry is using a rust implementation of the stack walker.
https://github.com/google/breakpad/blob/main/docs/stack_walk...
Also see recent discussion here:
I dug around in that code a little, and although it contains a disassembler, it's not being used for inspecting the call chain. All it does is check that the address appears to be inside a code section.
https://github.com/google/breakpad/blob/main/src/processor/s...
Windows: VirtualQuery()
Mac: vm_region()
Your own OS (like this article): you should know.