BinaryAnalysisPlatform / qemu

Official QEMU mirror
Other
9 stars 12 forks source link

Fix toc generation when guest receives fatal signal #11

Closed jedav closed 6 years ago

jedav commented 6 years ago

Currently, if the traced guest receives a fatal signal, the qemu tracer exits without writing out a table of contents for the generated frames, and leaves the number of frames field in the header set to 0. To observe this behavior, compile and trace the following C:

void main() {
  int *x=(int *)0;
  *x = 0;
}

and examine the generated frames.

This pull request causes qemu to finish writing the trace metadata before exiting from a guest-fatal signal.

ivg commented 6 years ago

thanks, this really nice feature!