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 条
[41]  
Park Jihyeok, P 43 INT C SOFTW ENG
[42]   Fuzzing Java']JavaScript Engines with Aspect-preserving Mutation [J].
Park, Soyeon ;
Xu, Wen ;
Yun, Insu ;
Jang, Daehee ;
Kim, Taesoo .
2020 IEEE SYMPOSIUM ON SECURITY AND PRIVACY (SP 2020), 2020, :1628-1642
[43]  
Radford A., 2019, Language Models are Few-Shot Learners
[44]  
Rebert A, 2014, PROCEEDINGS OF THE 23RD USENIX SECURITY SYMPOSIUM, P861
[45]  
Samuel GroB, 2018, THESIS KARLSRUHE I T
[46]  
Sennrich R, 2016, PROCEEDINGS OF THE 54TH ANNUAL MEETING OF THE ASSOCIATION FOR COMPUTATIONAL LINGUISTICS, VOL 1, P1715
[47]   Perses: Syntax-Guided Program Reduction [J].
Sun, Chengnian ;
Li, Yuanbo ;
Zhang, Qirun ;
Gu, Tianxiao ;
Su, Zhendong .
PROCEEDINGS 2018 IEEE/ACM 40TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2018, :361-371
[48]   Finding and Analyzing Compiler Warning Defects [J].
Sun, Chengnian ;
Le, Vu ;
Su, Zhendong .
2016 IEEE/ACM 38TH INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE), 2016, :203-213
[49]  
Sun ZY, 2019, AAAI CONF ARTIF INTE, P7055
[50]  
Sutton Michael, 2007, Fuzzing: brute force vulnerability discovery