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. Please, contact Francesco Zappa Nardelli for further information. Papers Reliable and Fast DWARF-based Stack Unwinding, in OOPSLA 2019. [slides] Source code The project source code is avaliable from github. Additionally, we provide the tarballs below. 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. Software dwarf-unwind-validator : Available upon request. Dwarf Unwinding Synthesis v0.2 sources and README.

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. Software Dwarf Unwinding Speedup v0.2 sources and README.

For evaluation purposes only, not up to date with the latest version of our tools, we provide a VirtualBox VM (careful: 3.8 GB download) with our software preinstalled, including tests and experimental results.