Where Did My Variable Go? Poking Holes in Incomplete Debug Information

11/17/2022
by   Cristian Assaiante, et al.
0

The availability of debug information for optimized executables can largely ease crucial tasks such as crash analysis. Source-level debuggers use this information to display program state in terms of source code, allowing users to reason on it even when optimizations alter program structure extensively. A few recent endeavors have proposed effective methodologies for identifying incorrect instances of debug information, which can mislead users by presenting them with an inconsistent program state. In this work, we identify and study a related important problem: the completeness of debug information. Unlike correctness issues for which an unoptimized executable can serve as reference, we find there is no analogous oracle to deem when the cause behind an unreported part of program state is an unavoidable effect of optimization or a compiler implementation defect. In this scenario, we argue that empirically derived conjectures on the expected availability of debug information can serve as an effective means to expose classes of these defects. We propose three conjectures involving variable values and study how often synthetic programs compiled with different configurations of the popular gcc and LLVM compilers deviate from them. We then discuss techniques to pinpoint the optimizations behind such violations and minimize bug reports accordingly. Our experiments revealed, among others, 24 bugs already confirmed by the developers of the gcc-gdb and clang-lldb ecosystems.

READ FULL TEXT
research
09/02/2020

CcNav: Understanding Compiler Optimizations in Binary Code

Program developers spend significant time on optimizing and tuning progr...
research
07/02/2023

LLM4CBI: Taming LLMs to Generate Effective Test Programs for Compiler Bug Isolation

Compiler bugs pose a significant threat to safety-critical applications,...
research
05/17/2020

Not So Fast: Understanding and Mitigating Negative Impacts of Compiler Optimizations on Code Reuse Gadget Sets

Despite extensive testing and correctness certification of their functio...
research
08/08/2017

On-Stack Replacement à la Carte

On-stack replacement (OSR) dynamically transfers execution between diffe...
research
03/26/2018

Source Code Optimization using Equivalent Mutants

A mutant is a program obtained by syntactically modifying a program's so...
research
01/29/2019

DeClassifier: Class-Inheritance Inference Engine for Optimized C++ Binaries

Recovering class inheritance from C++ binaries has several security bene...
research
10/10/2018

On the Refinement of Spreadsheet Smells by means of Structure Information

Spreadsheet users are often unaware of the risks imposed by poorly desig...

Please sign up or login with your details

Forgot password? Click here to reset