Title
A Differential Approach to Undefined Behavior Detection
Abstract
This article studies undefined behavior arising in systems programming languages such as C/C++. Undefined behavior bugs lead to unpredictable and subtle systems behavior, and their effects can be further amplified by compiler optimizations. Undefined behavior bugs are present in many systems, including the Linux kernel and the Postgres database. The consequences range from incorrect functionality to missing security checks. This article proposes a formal and practical approach that finds undefined behavior bugs by finding “unstable code” in terms of optimizations that leverage undefined behavior. Using this approach, we introduce a new static checker called Stack that precisely identifies undefined behavior bugs. Applying Stack to widely used systems has uncovered 161 new bugs that have been confirmed and fixed by developers.
Year
DOI
Venue
2015
10.1145/2885256
Communications of the ACM
Keywords
Field
DocType
security and protection,security,undefined behavior,languages,reliability,compiler optimizations,semantics of programming languages
System programming,Computer science,Undefined behavior,Theoretical computer science,Real-time computing,Optimizing compiler,Linux kernel
Journal
Volume
Issue
ISSN
59
3
0001-0782
Citations 
PageRank 
References 
10
0.51
24
Authors
4
Name
Order
Citations
PageRank
Xi Wang154029.04
Nickolai Zeldovich22377126.15
M. Frans Kaashoek3155581966.90
Armando Solar-Lezama479159.48