Automated Conformance Testing for Java']JavaScript Engines via Deep Compiler Fuzzing

被引:46
作者
Ye, Guixin [1 ]
Tang, Zhanyong [1 ]
Tan, Shin Hwei [2 ]
Huang, Songfang [3 ]
Fang, Dingyi [1 ]
Sun, Xiaoyang [4 ]
Bian, Lizhong [5 ]
Wang, Haibo [4 ]
Wang, Zheng [4 ]
机构
[1] Northwest Univ, Xian, Peoples R China
[2] Southern Univ Sci & Technol, Shenzhen, Peoples R China
[3] Alibaba DAMO Acad, Beijing, Peoples R China
[4] Univ Leeds, Leeds, W Yorkshire, England
[5] Alipay Hangzhou Informat & Technol Co Ltd, Hangzhou, Peoples R China
来源
PROCEEDINGS OF THE 42ND ACM SIGPLAN INTERNATIONAL CONFERENCE ON PROGRAMMING LANGUAGE DESIGN AND IMPLEMENTATION (PLDI '21) | 2021年
基金
中国国家自然科学基金;
关键词
!text type='Java']Java[!/text]Script; Conformance bugs; Compiler fuzzing; Differential testing; Deep learning;
D O I
10.1145/3453483.3454054
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
JavaScript (JS) is a popular, platform-independent programming language. To ensure the interoperability of JS programs across different platforms, the implementation of a JS engine should conform to the ECMAScript standard. However, doing so is challenging as there are many subtle definitions of API behaviors, and the definitions keep evolving. We present Comfort, a new compiler fuzzing framework for detecting JS engine bugs and behaviors that deviate from the ECMAScript standard. COMFORT leverages the recent advance in deep learning-based language models to automatically generate JS test code. As a departure from prior fuzzers, COMFORT utilizes the well-structured ECMAScript specifications to automatically generate test data along with the test programs to expose bugs that could be overlooked by the developers or manually written test cases. COMFORT then applies differential testing methodologies on the generated test cases to expose standard conformance bugs. We apply COMFORT to ten mainstream JS engines. In 200 hours of automated concurrent testing runs, we discover bugs in all tested JS engines. We had identified 158 unique JS engine bugs, of which 129 have been verified, and 115 have already been fixed by the developers. Furthermore, 21 of the COMFORT-generated test cases have been added to Test262, the official ECMAScript conformance test suite.
引用
收藏
页码:435 / 450
页数:16
相关论文
共 62 条
[1]   code2vec: Learning Distributed Representations of Code [J].
Alon, Uri ;
Zilberstein, Meital ;
Levy, Omer ;
Yahav, Eran .
PROCEEDINGS OF THE ACM ON PROGRAMMING LANGUAGES-PACMPL, 2019, 3 (POPL)
[2]  
Alon Uri, 2019, 7 INT C LEARNING REP
[3]  
[Anonymous], 2015, ACS SYM SER
[4]  
Bastani O, 2017, ACM SIGPLAN NOTICES, V52, P95, DOI [10.1145/3062341.3062349, 10.1145/3140587.3062349]
[5]  
Bielik P, 2016, PR MACH LEARN RES, V48
[6]   Coverage-Based Greybox Fuzzing as Markov Chain [J].
Bohme, Marcel ;
Van-Thuan Pham ;
Roychoudhury, Abhik .
IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2019, 45 (05) :489-506
[7]   Program-Adaptive Mutational Fuzzing [J].
Cha, Sang Kil ;
Woo, Maverick ;
Brumley, David .
2015 IEEE SYMPOSIUM ON SECURITY AND PRIVACY SP 2015, 2015, :725-741
[8]   A Survey of Compiler Testing [J].
Chen, Junjie ;
Patra, Jibesh ;
Pradel, Michael ;
Xiong, Yingfei ;
Zhang, Hongyu ;
Hao, Dan ;
Zhang, Lu .
ACM COMPUTING SURVEYS, 2020, 53 (01)
[9]   An Empirical Comparison of Compiler Testing Techniques [J].
Chen, Junjie ;
Hu, Wenxiang ;
Hao, Dan ;
Xiong, Yingfei ;
Zhang, Hongyu ;
Zhang, Lu ;
Xie, Bing .
2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2016, :180-190
[10]   Taming Compiler Fuzzers [J].
Chen, Yang ;
Groce, Alex ;
Zhang, Chaoqiang ;
Wong, Weng-Keen ;
Fern, Xiaoli ;
Eide, Eric ;
Regehr, John .
ACM SIGPLAN NOTICES, 2013, 48 (06) :197-207