An Empirical Study on API-Misuse Bugs in Open-Source C Programs

被引:19
作者
Gu, Zuxing [1 ]
Wu, Jiecheng [1 ]
Liu, Jiaxiang [2 ]
Zhou, Min [1 ]
Gu, Ming [1 ]
机构
[1] Tsinghua Univ, Sch Software, Beijing, Peoples R China
[2] Shenzhen Univ, Coll Comp Sci & Software Engn, Shenzhen, Peoples R China
来源
2019 IEEE 43RD ANNUAL COMPUTER SOFTWARE AND APPLICATIONS CONFERENCE (COMPSAC), VOL 1 | 2019年
基金
中国国家自然科学基金;
关键词
API misuse; empirical study; benchmark; bug detection; STATIC ANALYSIS;
D O I
10.1109/COMPSAC.2019.00012
中图分类号
TP39 [计算机的应用];
学科分类号
081203 ; 0835 ;
摘要
Today, large and complex software is developed with integrated components using application programming interfaces (APIs). Correct usage of APIs in practice presents a challenge due to implicit constraints, such as call conditions or call orders. API misuse, i.e., violation of these constraints, is a well-known source of bugs, some of which can cause serious security vulnerabilities. Although researchers have developed many API-misuse detectors over the last two decades, recent studies show that API misuses are still prevalent. In this paper, we provide a comprehensive empirical study on API-misuse bugs in open-source C programs. To understand the nature of API misuses in practice, we analyze 830 API-misuse bugs from six popular programs across different domains. For all the studied bugs, we summarize their root causes, fix patterns and usage statistics. Furthermore, to understand the capabilities and limitations of state-of-the-art static analysis detectors for API-misuse detection, we develop APIMU4C, a dataset of API-misuse bugs in C code based on our empirical study results, and evaluate three widely-used detectors on it qualitatively and quantitatively. We share all the findings and present possible directions towards more powerful API-misuse detectors.
引用
收藏
页码:11 / 20
页数:10
相关论文
共 40 条
[1]  
Amann S., 2018, IEEE T SOFTWARE ENG, P1
[2]  
Amann S, 2016, 13TH WORKING CONFERENCE ON MINING SOFTWARE REPOSITORIES (MSR 2016), P464, DOI [10.1109/MSR.2016.055, 10.1145/2901739.2903506]
[3]  
[Anonymous], 2018, JULIET TEST SUITE
[4]  
[Anonymous], 2018, SOURCE CODE LINUX KE
[5]  
[Anonymous], 2018, FFMPEG COLLECTION LI
[6]  
[Anonymous], 2018, HTTPD POWERFUL FLEXI
[7]  
[Anonymous], 2018, STATIC ANAL BENCHMAR
[8]  
[Anonymous], 2018, FREERDP TREE REMOTE
[9]  
[Anonymous], P ACM SIGSOFT 20 INT
[10]  
[Anonymous], 2018, CURL COMMAND LINE TO