Finding Compiler Bugs through Cross-Language Code Generator and Differential Testing
Qiong Feng, Xiaotian Ma, Ziyuan Feng, Marat Akhin, Wei Song, Peng Liang

TL;DR
This paper introduces CrossLangFuzzer, a framework for detecting bugs in cross-language compilers by generating diverse test programs and applying mutation techniques, successfully finding multiple bugs in popular JVM languages.
Contribution
It presents the first dedicated approach for identifying and diagnosing compiler bugs in cross-language compilation scenarios using a novel IR and mutation strategies.
Findings
Discovered 24 bugs across Kotlin, Groovy, Scala, and Java compilers.
TypeChanger mutation was the most effective, detecting 11 bugs.
Analyzed symptoms and root causes of cross-compilation bugs.
Abstract
Compilers play a central role in translating high-level code into executable programs, making their correctness essential for ensuring code safety and reliability. While extensive research has focused on verifying the correctness of compilers for single-language compilation, the correctness of cross-language compilation - which involves the interaction between two languages and their respective compilers - remains largely unexplored. To fill this research gap, we propose CrossLangFuzzer, a novel framework that introduces a universal intermediate representation (IR) for JVM-based languages and automatically generates cross-language test programs with diverse type parameters and complex inheritance structures. After generating the initial IR, CrossLangFuzzer applies three mutation techniques - LangShuffler, FunctionRemoval, and TypeChanger - to enhance program diversity. By evaluating…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Logic, programming, and type systems · Software Engineering Research
