Sciweavers

CACM
2016

A differential approach to undefined behavior detection

8 years 1 months ago
A differential approach to undefined behavior detection
This paper 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 paper proposes a formal and practical approach, which 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.
Xi Wang, Nickolai Zeldovich, M. Frans Kaashoek, Ar
Added 30 Mar 2016
Updated 30 Mar 2016
Type Journal
Year 2016
Where CACM
Authors Xi Wang, Nickolai Zeldovich, M. Frans Kaashoek, Armando Solar-Lezama
Comments (0)