Lune

SOSP2023Top-tier venue

Validating JIT Compilers via Compilation Space Exploration

Cong Li, Yanyan Jiang, Chang Xu, Zhendong Su

Abstract

We introduce the concept of compilation space as a new pivot for the comprehensive validation of just-intime (JIT) compilers in modern language virtual machines (LVMs). The compilation space of a program encompasses a wide range of equivalent JIT-compilation choices, which can be cross-validated to ensure the correctness of the program's JIT compilations. To thoroughly explore the compilation space in a lightweight and LVM-agnostic manner, we strategically mutate test programs with JIT-relevant but semantics-preserving code constructs, aiming to provoke diverse JIT compilation optimizations. We primarily implement this approach in Artemis, a tool for validating Java Virtual Machines (JVMs). Within three months, Artemis successfully discovered 85 bugs in three widely used production JVMs-HotSpot, OpenJ9, and the Android Runtimewhere 53 were already confirmed or fixed and many of which were classified as critical. It is noteworthy that all reported bugs concern JIT compilers, highlighting the effectiveness and practicality of our technique. Building on the promising results with JVMs, we experimentally applied our technique to a state-of-the-art JavaScript Engine (JSE) fuzzer called Fuzzilli, aiming to augment it to find mis-compilation bugs without significantly sacrificing its ability to detect crashes. Our experiments demonstrate that our enhanced version of Fuzzilli namely Apollo could achieve comparable code coverage with a considerably smaller number of generated programs with a similar number of crashes. Additionally, Apollo successfully uncovered four mis-compilations in JavaScriptCore and SpiderMonkey within seven days. Following Artemis' and Apollo's success, we are expecting that the generality and practicability of our approach will make it broadly applicable for understanding and validating the JIT compilers of other LVMs.

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.

17 top-tier papers have cited it since. Know what they found before your reviewers do.

Questions to start from

Lune can draw on

the full paper · the top-tier papers that cite it · related work

Get the answer

Free to start. No credit card required.

Lineage

  • PolyJuice: Detecting Mis-compilation Bugs in Tensor Compilers with Equality Saturation Based Rewriting cites CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript Engines
  • NAUTILUS: Fishing for Deep Bugs with Grammars cites Skyfire: Data-Driven Seed Generation for Fuzzing
  • The Mutators Reloaded: Fuzzing Compilers with Large Language Model Generated Mutation Operators cites Random testing for C and C++ compilers with YARPGen
  • The Mutators Reloaded: Fuzzing Compilers with Large Language Model Generated Mutation Operators cites CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript Engines
  • Java JIT Testing with Template Extraction cites Random testing for C and C++ compilers with YARPGen
  • CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript Engines cites Skyfire: Data-Driven Seed Generation for Fuzzing
  • Unveiling Compiler Faults via Attribute-Guided Compilation Space Exploration cites The Mutators Reloaded: Fuzzing Compilers with Large Language Model Generated Mutation Operators
  • Unveiling Compiler Faults via Attribute-Guided Compilation Space Exploration cites Random testing for C and C++ compilers with YARPGen
  • Fuzzing JavaScript Engines with Aspect-preserving Mutation cites NAUTILUS: Fishing for Deep Bugs with Grammars
  • Fuzzing JavaScript Engines with Aspect-preserving Mutation cites Skyfire: Data-Driven Seed Generation for Fuzzing
  • Fuzzing JavaScript Engines with Aspect-preserving Mutation cites CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript Engines
Builds onCited byLeft to right by year; the more cited, the higher.

Cited by top-tier papers17

  1. The Mutators Reloaded: Fuzzing Compilers with Large Language Model Generated Mutation OperatorsXianfei Ou, Cong Li, Yanyan Jiang, Chang XuASPLOS 2024 · 25 citations
  2. Java JIT Testing with Template ExtractionZhiqiang Zang, Fu-Yao Yu, Aditya Thimmaiah, August Shi et al.FSE 2024 · 8 citations
  3. PolyJuice: Detecting Mis-compilation Bugs in Tensor Compilers with Equality Saturation Based RewritingChijin Zhou, Bingzhou Qian, Gwihwan Go, Quan Zhang et al.OOPSLA 2024 · 7 citations
  4. MeshTest: End-to-End Testing for Service Mesh Traffic ManagementNaiqian Zheng, Tianshuo Qiao, Xuanzhe Liu, Xin JinNSDI 2025 · 7 citations
  5. Unveiling Compiler Faults via Attribute-Guided Compilation Space ExplorationJiangchang Wu, Yibiao Yang, Maolin Sun, Yuming ZhouUSENIX ATC 2025 · 6 citations

Builds on35

  1. Skyfire: Data-Driven Seed Generation for FuzzingJunjie Wang, Bihuan Chen, Lei Wei, Yang LiuS&P 2017 · 382 citations
  2. NAUTILUS: Fishing for Deep Bugs with GrammarsCornelius Aschermann, Tommaso Frassetto, Thorsten Holz, Patrick Jauernig et al.NDSS 2019 · 291 citations
  3. CodeAlchemist: Semantics-Aware Code Generation to Find Vulnerabilities in JavaScript EnginesHyungSeok Han, DongHyeon Oh, Sang Kil ChaNDSS 2019 · 178 citations
  4. Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 140 citations
  5. Fuzzing JavaScript Engines with Aspect-preserving MutationSoyeon Park, Wen Xu, Insu Yun, Daehee Jang et al.S&P 2020 · 126 citations

Related papers

  1. FuzzJIT: Oracle-Enhanced Fuzzing for JavaScript Engine JIT CompilerJunjie Wang, Zhiyi Zhang, Shuang Liu, Xiaoning Du et al.USENIX Security 2023
  2. Detecting JVM JIT Compiler Bugs via Exploring Two-Dimensional Input SpacesHaoxiang Jia, Ming Wen, Zifan Xie, Xiaochen Guo et al.ICSE 2023 · 21 citations
  3. FUZZILLI: Fuzzing for JavaScript JIT Compiler VulnerabilitiesSamuel Groß, Simon Koch, Lukas Bernhard, Thorsten Holz et al.NDSS 2023
  4. BCFuzz: Bytecode-Driven Fuzzing for JavaScript EnginesJiming Wang, Chenggang Wu, Jikai Ren, Yuhao Hu et al.ASE 2025 · 1 citation
  5. JIT-Picking: Differential Fuzzing of JavaScript EnginesLukas Bernhard, Tobias Scharnowski, Moritz Schloegel, Tim Blazytko et al.CCS 2022 · 42 citations
Dusk over the sea between two cliffs drawn in fine vertical lines