Java JIT Testing with Template Extraction
Zhiqiang Zang, Fu-Yao Yu, Aditya Thimmaiah, August Shi, Milos Gligoric
Abstract
We present LeJit, a template-based framework for testing Java just-in-time (JIT) compilers. Like recent template-based frameworks, LeJit executes a template-a program with holes to be filled-to generate concrete programs given as inputs to Java JIT compilers. LeJit automatically generates template programs from existing Java code by converting expressions to holes, as well as generating necessary glue code (i.e., code that generates instances of non-primitive types) to make generated templates executable. We have successfully used LeJit to test a range of popular Java JIT compilers, revealing five bugs in HotSpot, nine bugs in OpenJ9, and one bug in GraalVM. All of these bugs have been confirmed by Oracle and IBM developers, and 11 of these bugs were previously unknown, including two CVEs (Common Vulnerabilities and Exposures). Our comparison with several existing approaches shows that LeJit is complementary to them and is a powerful technique for ensuring Java JIT compiler correctness.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
9 top-tier papers have cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Validating JIT Compilers via Compilation Space Exploration cites Finding typing compiler bugs
- Validating JIT Compilers via Compilation Space Exploration cites History-Driven Test Program Synthesis for JVM Testing
- Validating JIT Compilers via Compilation Space Exploration cites Random testing for C and C++ compilers with YARPGen
- Validating JIT Compilers via Compilation Space Exploration cites JITfuzz: Coverage-guided Fuzzing for JVM Just-in-Time Compilers
- Finding Compiler Bugs through Cross-Language Code Generator and Differential Testing cites Finding typing compiler bugs
- Finding Compiler Bugs through Cross-Language Code Generator and Differential Testing cites History-Driven Test Program Synthesis for JVM Testing
- Finding Compiler Bugs through Cross-Language Code Generator and Differential Testing cites Random testing for C and C++ compilers with YARPGen
- Finding typing compiler bugs cites Random testing for C and C++ compilers with YARPGen
- Extraction and Mutation at a High Level: Template-Based Fuzzing for JavaScript Engines cites Validating JIT Compilers via Compilation Space Exploration
- Extraction and Mutation at a High Level: Template-Based Fuzzing for JavaScript Engines cites History-Driven Test Program Synthesis for JVM Testing
- Extraction and Mutation at a High Level: Template-Based Fuzzing for JavaScript Engines cites JITfuzz: Coverage-guided Fuzzing for JVM Just-in-Time Compilers
- Selecting Initial Seeds for Better JVM Fuzzing cites History-Driven Test Program Synthesis for JVM Testing
- Selecting Initial Seeds for Better JVM Fuzzing cites JITfuzz: Coverage-guided Fuzzing for JVM Just-in-Time Compilers
- Selecting Initial Seeds for Better JVM Fuzzing cites Evaluating Fuzz Testing
- JITfuzz: Coverage-guided Fuzzing for JVM Just-in-Time Compilers cites History-Driven Test Program Synthesis for JVM Testing
Cited by top-tier papers9
- Validating JIT Compilers via Compilation Space ExplorationCong Li, Yanyan Jiang, Chang Xu, Zhendong SuSOSP 2023 · 22 citations
- Extraction and Mutation at a High Level: Template-Based Fuzzing for JavaScript EnginesWai Kin Wong, Dongwei Xiao, Anthony Cheuk Tung Lai, Yiteng Peng et al.OOPSLA 2025 · 4 citations
- Finding Compiler Bugs through Cross-Language Code Generator and Differential TestingQiong Feng, Xiaotian Ma, Ziyuan Feng, Marat Akhin et al.OOPSLA 2025 · 2 citations
- Selecting Initial Seeds for Better JVM FuzzingTianchang Gao, Junjie Chen, Dong Wang, Yile Guo et al.ICSE 2025 · 2 citations
- OBsmith: LLM-Powered JavaScript Obfuscator TestingShan Jiang, Chenguang Zhu, Sarfraz KhurshidOOPSLA 2026 · 2 citations
Builds on12
- Evaluating Fuzz TestingGeorge Klees, Andrew Ruef, Benji Cooper, Shiyi Wei et al.CCS 2018 · 753 citations
- Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 140 citations
- History-Driven Test Program Synthesis for JVM TestingYingquan Zhao, Zan Wang, Junjie Chen, Mengdi Liu et al.ICSE 2022 · 51 citations
- Finding typing compiler bugsStefanos Chaliasos, Thodoris Sotiropoulos, Diomidis Spinellis, Arthur Gervais et al.PLDI 2022 · 36 citations
- JITfuzz: Coverage-guided Fuzzing for JVM Just-in-Time CompilersMingyuan Wu, Minghai Lu, Heming Cui, Junjie Chen et al.ICSE 2023 · 36 citations
Related papers
- Compiler Testing using Template Java ProgramsZhiqiang Zang, Nathan Wiatrek, Milos Gligoric, August ShiASE 2022 · 21 citations
- FuzzJIT: Oracle-Enhanced Fuzzing for JavaScript Engine JIT CompilerJunjie Wang, Zhiyi Zhang, Shuang Liu, Xiaoning Du et al.USENIX Security 2023
- Understanding and Finding JIT Compiler Performance BugsZijian Yi, Cheng Ding, August Shi, Milos GligoricOOPSLA 2026
- Pattern-Based Peephole Optimizations with Java JIT TestsZhiqiang Zang, Aditya Thimmaiah, Milos GligoricISSTA 2023 · 2 citations
- Vectorizing Program Ingredients for Better JVM TestingTianchang Gao, Junjie Chen, Yingquan Zhao, Yuqun Zhang et al.ISSTA 2023 · 16 citations
