DOUBLETAKE: Fast and Precise Error Detection via Evidence-Based Dynamic Analysis

被引:37
作者
Liu, Tongping [1 ]
Curtsinger, Charlie [2 ]
Berger, Emery D. [3 ]
机构
[1] Univ Texas San Antonio, Dept Comp Sci, San Antonio, TX 78249 USA
[2] Grinnell Coll, Dept Comp Sci, 1116 8th Ave, Grinnell, IA 50112 USA
[3] Univ Massachusetts, Coll Informat & Comp Sci, Amherst, MA 01003 USA
来源
2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE) | 2016年
基金
美国国家科学基金会;
关键词
Dynamic Analysis; Software Quality; Testing; Debugging; Leak Detection; Buffer Overflow Detection; Use-After-Free Detection;
D O I
10.1145/2884781.2884784
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Programs written in unsafe languages like C and C++ often suffer from errors like buffer overflows, dangling pointers, and memory leaks. Dynamic analysis tools like Valgrind can detect these errors, but their overhead-primarily due to the cost of instrumenting every memory read and write-makes them too heavyweight for use in deployed applications and makes testing with them painfully slow. The result is that much deployed software remains susceptible to these bugs, which are notoriously difficult to track down. This paper presents evidence-based dynamic analysis, an approach that enables these analyses while imposing minimal overhead (under 5%), making it practical for the first time to perform these analyses in deployed settings. The key insight of evidence-based dynamic analysis is that for a class of errors, it is possible to ensure that evidence that they happened at some point in the past remains for later detection. Evidence-based dynamic analysis allows execution to proceed at nearly full speed until the end of an epoch (e.g., a heavyweight system call). It then examines program state to check for evidence that an error occurred at some time during that epoch. If so, it rolls back execution and re-executes the code with instrumentation activated to pinpoint the error. We present DOUBLETAKE, a prototype evidence-based dynamic analysis framework. DOUBLETAKE is practical and easy to deploy, requiring neither custom hardware, compiler, nor operating system support. We demonstrate DOUBLETAKE's generality and efficiency by building dynamic analyses that find buffer overflows, memory use-after-free errors, and memory leaks. Our evaluation shows that DOUBLETAKE is efficient, imposing under 5% overhead on average, making it the fastest such system to date. It is also precise: DOUBLETAKE pinpoints the location of these errors to the exact line and memory addresses where they occur, providing valuable debugging information to programmers.
引用
收藏
页码:911 / 922
页数:12
相关论文
共 33 条
[1]  
Altekar G, 2009, SOSP'09: PROCEEDINGS OF THE TWENTY-SECOND ACM SIGOPS SYMPOSIUM ON OPERATING SYSTEMS PRINCIPLES, P193
[2]  
[Anonymous], 2009, USENIX Security Symposium
[3]   Composing high-performance memory allocators [J].
Berger, ED ;
Zorn, BG ;
McKinley, KS .
ACM SIGPLAN NOTICES, 2001, 36 (05) :114-124
[4]   Bell: Bit-encoding online memory leak detection [J].
Bond, Michael D. ;
McKinley, Kathryn S. .
ACM SIGPLAN NOTICES, 2006, 41 (11) :61-72
[5]  
Bressoud T. C., 1995, Operating Systems Review, V29, P1, DOI 10.1145/224057.224058
[6]   An infrastructure for adaptive dynamic optimization [J].
Bruening, D ;
Garnett, T ;
Amarasinghe, S .
CGO 2003: INTERNATIONAL SYMPOSIUM ON CODE GENERATION AND OPTIMIZATION, 2003, :265-275
[7]  
Bruening D, 2011, PROCEED CGO, P213, DOI 10.1109/CGO.2011.5764689
[8]  
Caballero J., 2012, P 2012 INT S SOFTWAR, P133
[9]  
Chilimbi TM, 2004, ACM SIGPLAN NOTICES, V39, P156, DOI 10.1145/1037187.1024412
[10]  
Chow Jim., 2008, USENIX 2008 ANN TECH, P1