Write a Blog >>
PLDI 2020
Mon 15 - Fri 19 June 2020

Almost all modern production software is compiled with optimization.
Debugging optimized code is a desirable functionality.
For example,
developers usually perform post-mortem debugging on the coredumps produced by
software crashes.
Designing reliable debugging techniques for optimized code
has been well-studied in the past.
However, little is known about the correctness of the debug information generated by optimizing compilers when debugging optimized code.

Optimizing compilers emit debug information (e.g., DWARF information) to support
source code debuggers.
Wrong debug information causes debuggers to either
crash or to display
wrong variable values.
Existing debugger validation techniques only focus on testing the interactive aspect of
debuggers for dynamic languages (i.e., with unoptimized code).
Validating debug information for optimized code raises some unique
many breakpoints cannot be reached by debuggers due to
code optimization; and (2)
inspecting some arbitrary variables such as uninitialized variables introduces undefined

This paper presents the first generic framework for systematically testing debug information with
optimized code.
We introduce a novel concept called \emph{actionable program}.
An actionable program $P_{\langle s,
v\rangle}$ contains a program location $s$ and a
variable $v$ to inspect.
Our key insight is that
in both the unoptimized program $P_{\langle s,v\rangle}$ and the optimized program $P^\prime_{\langle s,v\rangle}$,
debuggers should be able to stop at the program location $s$ and inspect the value of the variable $v$ without any undefined behaviors.
Our framework generates actionable programs and does systematic testing by comparing the
debugger output of $P^\prime_{\langle s,
v\rangle}$ and the actual value of $v$ at line $s$ in $P_{\langle s, v\rangle}$.
We have applied our framework to two mainstream optimizing C
compilers (i.e., GCC and LLVM).
Our framework
has led to 47 confirmed bug reports, 11 of which have already been fixed.
Moreover, in three days, our technique has found 2 confirmed bugs in the Rust
compiler. The results have demonstrated the effectiveness and generality of our framework.

Fri 19 Jun
Times are displayed in time zone: (GMT-07:00) Pacific Time (US & Canada) change

06:20 - 07:40: PLDI Research Papers - Parsing, Debugging, and Code Search at PLDI Research Papers live stream
Chair(s): Dan BarowyWilliams College

YouTube lightning session video

pldi-2020-papers06:20 - 06:40
Grzegorz HermanJagiellonian University, Poland
pldi-2020-papers06:40 - 07:00
Romain EdelmannEPFL, Switzerland, Jad HamzaEPFL, Switzerland, Viktor KunĨakEPFL, Switzerland
pldi-2020-papers07:00 - 07:20
Yuanbo LiGeorgia Institute of Technology, USA, Shuo DingGeorgia Institute of Technology, USA, Qirun ZhangGeorgia Institute of Technology, USA, Davide ItalianoApple, USA
pldi-2020-papers07:20 - 07:40
Varot PremtoonMassachusetts Institute of Technology, USA, James KoppelMassachusetts Institute of Technology, USA, Armando Solar-LezamaMassachusetts Institute of Technology, USA