Towards Optimization-Safe Systems: Analyzing the Impact of Undefined Behavior

被引:78
作者
Wang, Xi [1 ]
Zeldovich, Nickolai [1 ]
Kaashoek, M. Frans [1 ]
Solar-Lezama, Armando [1 ]
机构
[1] MIT CSAIL, Cambridge, MA 02139 USA
来源
SOSP'13: PROCEEDINGS OF THE TWENTY-FOURTH ACM SYMPOSIUM ON OPERATING SYSTEMS PRINCIPLES | 2013年
关键词
D O I
10.1145/2517349.2522728
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
This paper studies an emerging class of software bugs called optimization-unstable code: code that is unexpectedly discarded by compiler optimizations due to undefined behavior in the program. Unstable code is present in many systems, including the Linux kernel and the Postgres database. The consequences of unstable code range from incorrect functionality to missing security checks. To reason about unstable code, this paper proposes a novel model, which views unstable code in terms of optimizations that leverage undefined behavior. Using this model, we introduce a new static checker called Stack that precisely identifies unstable code. Applying Stack to widely used systems has uncovered 160 new bugs that have been confirmed and fixed by developers.
引用
收藏
页码:260 / 275
页数:16
相关论文
共 43 条
[1]  
[Anonymous], 2012, 10th USENIX Symposium on Operating Systems Design and Implementation, OSDI'12
[2]  
[Anonymous], 2011, 98992011 ISOIEC JTC1
[3]  
[Anonymous], FUN NULL POINTERS 1
[4]  
[Anonymous], 2003, RAT INT STAND PROGR
[5]  
[Anonymous], 1997, Advanced compiler design implementation
[6]  
[Anonymous], 2012, P USENIX
[7]   Threads cannot be implemented as a library [J].
Boehm, HJ .
ACM SIGPLAN NOTICES, 2005, 40 (06) :261-268
[8]  
Brummayer R, 2009, LECT NOTES COMPUT SC, V5505, P174, DOI 10.1007/978-3-642-00768-2_16
[9]  
Cadar C., P 8 S OP SYST DES IM
[10]   A Value Analysis for C programs [J].
Canet, Geraud ;
Cuoq, Pascal ;
Monate, Benjamin .
2009 NINTH IEEE INTERNATIONAL WORKING CONFERENCE ON SOURCE CODE ANALYSIS AND MANIPULATION, PROCEEDINGS, 2009, :123-124