Debugging use-after-free with RR reverse execution
Published:
RR is a very useful tool for debugging. It
can record the execution of a program and then replay the exact same
execution at will inside a debugger. One very useful extra power
available since 4.0 is the support for efficient reverse
execution
which can be used to find the root cause of a bug in your program
by rewinding time. In this example, we reverse-execute a program from a
case of use-after-free in order to find where the block of memory was
freed.
Flamegraph
is a software which generates SVG graphics
to visualise stack-sampling based
profiles. It processes data collected with tools such as Linux perf,
SystemTap, DTrace.