Compiler correctness is a cornerstone of reliable software development. However, systematic testing of compilers is infeasible, given the vast space of possible programs and the complexity of modern programming languages. In this context, differential testing offers a practical methodology as it addresses the oracle problem by comparing the output of alternative compilers given the same set of programs as input. In this paper, we investigate the effectiveness of differential testing in finding bugs within the Kotlin compilers developed at JetBrains. We propose a black-box generative approach that creates input programs for the K1 and K2 compilers. First, we build workable models of Kotlin semantic (semantic interface) and syntactic (enriched context-free grammar) language features, which are subsequently exploited to generate random code snippets. Second, we extend random sampling by introducing two genetic algorithms (GAs) that aim to generate more diverse input programs. Our case study shows that the proposed approach effectively detects bugs in K1 and K2; these bugs have been confirmed and (some) fixed by JetBrains developers. While we do not observe a significant difference w.r.t. the number of defects uncovered by the different search algorithms, random search and GAs are complementary as they find different categories of bugs. Finally, we provide insights into the relationships between the size, complexity, and fault detection capability of the generated input programs.
CLIR: Liveness-Driven and Structure-Aware Fuzzing for the Cranelift Compiler
Beijing University of Posts and Telecommunications(北京邮电大学);Harbin Institute of Technology, Shenzhen(哈尔滨工业大学(深圳));Peking University(北京大学);The Hong Kong Polytechnic University(香港理工大学);Huazhong University of Science and Technology(华中科技大学)
FeatureFuzz: Treating Bug-prone Features as Core Primitives for Compiler Fuzzing
State Key Laboratory of Novel Software Technology, Nanjing University(南京大学软件新技术国家重点实验室);Institute of Dataspace, Hefei Comprehensive National Science Center(合肥综合性国家科学中心数据空间研究所);Honor Device Co., Ltd(荣耀终端有限公司)
Pattern-Guided Graph Synthesis for Suppressing Known Defects in DL Compiler Fuzzing
School of Computer Science and Engineering, Nanjing University of Science and Technology(南京理工大学计算机科学与工程学院);Department of Computer Science, Xidian University(西安电子科技大学计算机科学与技术学院);School of Computer Science, Wuhan University(武汉大学计算机学院)
Interleaved Learning and Exploration: A Self-Adaptive Fuzz Testing Framework for MLIR
Institute of Software Chinese Academy of Sciences Beijing, China;College of Intelligence;Computing Tianjin University Tianjin, China;Shanghai Key Laboratory of Trustworthy Computing East China Normal University Shanghai, China