Fast and Reliable DWARF Unwinding, and Beyond

Théophile Bastian, Stephen Kell, Francesco Zappa Nardelli.

DWARF is a widely-used debugging data format. DWARF is obviously relied upon by debuggers, but it plays an unexpected role in the runtime of high-level programming languages and in the implementation of program analysis tools. The debug information itself can be pervaded by subtle bugs, making the whole infrastructure unreliable. In this project we investigate techniques and tools to perform validation and synthesis of the DWARF stack unwinding tables, to speedup DWARF-based unwinding, as well as exploring adventurous projects that can be built on top of reliable DWARF information.

This research is sponsored by ONR VerticA project (grant 503353) and by a Google Faculty Research Award.

This project is in progress, and this page is for evaluation purposes only. Please, contact Francesco Zappa Nardelli for further information.


Recommended software: preinstalled VM

For evaluation purposes, we provide a

with all our software preinstalled, including tests and a draft paper describing the algorithms and the experimental results.

Source code

Validation and Synthesis of DWARF Unwinding Information

A first tool, dwarf-unwind-validator can dynamically validate the correctness of the (compiler generated) unwinding tables in ELF binaries. It has identified bugs in mainstream compilers and libraries (e.g. this LLVM bug). A second tool, dwarf-unwind-synthesis, can synthesize DWARF unwind tables from binaries that lacks them.


Speeding up DWARF Unwinding

We have implemented a tool that precompiles DWARF unwinding tables to assembly, and we have integrated an ad-hoc unwinder in libunwind and in the perf profiling tool. Benchmarks show a 25x-60x speedup in unwinding; size overhead of the precompiled tables is ~2.5x.


Last update: