Skip to Main content Skip to Navigation
Journal articles

Reliable and Fast DWARF-Based Stack Unwinding

Théophile Bastian 1 Stephen Kell 2 Francesco Zappa Nardelli 3
3 Parkas - Parallélisme de Kahn Synchrone
DI-ENS - Département d'informatique de l'École normale supérieure, CNRS - Centre National de la Recherche Scientifique, Inria de Paris
Abstract : Debug information, usually encoded in the DWARF format, is a hidden and obscure component of our computing infrastructure. Debug information is obviously used by debuggers, but it also plays a key role in program analysis tools, and, most surprisingly, it can be relied upon by the runtime of high-level programming languages. For instance the C++ runtime leverages DWARF stack unwind tables to implement exceptions! Alas, generating debug information adds significant burden to compiler implementations, and the debug information itself can be pervaded by subtle bugs, making the whole infrastructure unreliable. Additionally, interpreting the debug tables is a time-consuming task and, for some applications as sampling profilers, it turns out to be a performance bottleneck. In this paper we focus on the DWARF .eh_frame table, that enables stack unwinding in absence of frame-pointers. We will describe two techniques to perform validation and synthesis of the DWARF stack unwinding tables, and their implementation for the x86_64 architecture. The validation tool has proven effective for compiler and inline assembly testing, while the synthesis tool can generate DWARF unwind tables for arbitrary binaries lacking debug information. Additionally, we report on a technique to precompile unwind tables into native x86_64 code, which we have implemented and integrated into libunwind, resulting in 11x-25x DWARF-based unwind speedups.
Document type :
Journal articles
Complete list of metadata

Cited literature [24 references]  Display  Hide  Download

https://hal.inria.fr/hal-02297690
Contributor : Francesco Zappa Nardelli <>
Submitted on : Thursday, September 26, 2019 - 12:39:15 PM
Last modification on : Tuesday, September 22, 2020 - 3:48:34 AM
Long-term archiving on: : Monday, February 10, 2020 - 1:48:55 AM

File

main.pdf
Files produced by the author(s)

Identifiers

Collections

Citation

Théophile Bastian, Stephen Kell, Francesco Zappa Nardelli. Reliable and Fast DWARF-Based Stack Unwinding. Proceedings of the ACM on Programming Languages, ACM, 2019, OOPSLA, ⟨10.1145/3360572⟩. ⟨hal-02297690⟩

Share

Metrics

Record views

136

Files downloads

2661