rust-minidump / rust-minidump

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Process `Exception` even without matching `Thread`

Swatinem opened this issue · comments

I have a minidump that is extremely stripped down, and probably not very useful, it only has the following info:

  • System Info
  • A full module list
  • An empty memory list, so no stack memory available for unwinding whatsoever
  • An exception stream / entry
  • A thread list with a single thread, however that thread does not match the exception.

The problem with this minidump is that the exception info is not being used when processing. As the processor is iterating over all the threads, and the single thread in the minidump does not match the thread_id of the exception:

let context = if crashing_thread_id.or(self.requesting_thread_id) == Some(id) {
requesting_thread = Some(i);
exception_context.as_deref().or(thread_context.as_deref())

The exception is thus discarded and not being processed.

Apart from the fact that due to missing any kind of memory regions, unwinding itself is impossible, however the customer still wants to see at least the exception context symbolicated.

Sounds like a worthy improvement. Not doing unwinding because the thread's stack memory region is missing is something we already run into (in stack overflows on Linux for example) and we still print the exception and context correctly, so it's worth doing this too.