Lune

ISSTA2024Top-tier venue

AsFuzzer: Differential Testing of Assemblers with Error-Driven Grammar Inference

Hyungseok Kim, Soomin Kim, Jungwoo Lee, Sang Kil Cha

Abstract

Assembler is a critical component of the compiler toolchain, which has been less tested than the other components. Unfortunately, current grammar-based fuzzing techniques suffer from several challenges when testing assemblers. First, each different assembler accepts different grammar rules and syntaxes, and there are no existing assembly grammar specifications. Second, not every assembler is open-source, which makes it difficult to extract grammar rules from the source code. While existing black-box grammar inference approaches are applicable to such closed-source assemblers, they suffer from the scalability issue, which renders them impractical for testing assemblers. To address these challenges, we propose a novel way to test assemblers by automatically inferring their grammar rules with only a few queries to the target assemblers by leveraging their error messages. The key insight is that assembly error messages often deliver useful information to infer the underlying grammar rules. We have implemented our technique in a tool named AsFuzzer, and evaluated it on 4 real-world assemblers including Clang-integrated assembler (Clang), GNU assembler (GAS), Intel's assembler (ICC), and Microsoft macro assembler (MASM). With AsFuzzer, we have successfully found 497 buggy instruction opcodes for six popular architectures, and reported them to the developers.

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.

Questions to start from

Lune can draw on

the full paper · related work

Get the answer

Free to start. No credit card required.

Lineage

  • Learning Highly Recursive Input Grammars cites Mining input grammars from dynamic control flow
Builds onCited byLeft to right by year; the more cited, the higher.

Builds on11

  1. Random testing for C and C++ compilers with YARPGenVsevolod Livinskii, Dmitry Babokin, John RegehrOOPSLA 2020 · 140 citations
  2. DifuzzRTL: Differential Fuzz Testing to Find CPU BugsJaewon Hur, Suhwan Song, Dongup Kwon, Eunjin Baek et al.S&P 2021 · 126 citations
  3. Mining input grammars from dynamic control flowRahul Gopinath, Björn Mathis, Andreas ZellerFSE 2020 · 60 citations
  4. Effective Processor Verification with Logic Fuzzer Enhanced Co-simulationNursultan Kabylkas, Tommy Thorn, Shreesha Srinath, Polychronis Xekalakis et al.MICRO 2021 · 25 citations
  5. Learning Highly Recursive Input GrammarsNeil Kulkarni, Caroline Lemieux, Koushik SenASE 2021 · 24 citations

Related papers

  1. Testing the Compiler for a New-Born Programming Language: An Industrial Case Study (Experience Paper)Yingquan Zhao, Junjie Chen, Ruifeng Fu, Haojie Ye et al.ISSTA 2023 · 9 citations
  2. Interleaving Large Language Models for Compiler TestingYunbo Ni, Shaohua LiOOPSLA 2025 · 4 citations
  3. GrayC: Greybox Fuzzing of Compilers and Analysers for CKarine Even-Mendoza, Arindam Sharma, Alastair F. Donaldson, Cristian CadarISSTA 2023 · 52 citations
  4. TheHuzz: Instruction Fuzzing of Processors Using Golden-Reference Models for Finding Software-Exploitable VulnerabilitiesRahul Kande, Addison Crump, Garrett Persyn, Patrick Jauernig et al.USENIX Security 2022
  5. IRFuzzer: Specialized Fuzzing for LLVM Backend Code GenerationYuyang Rong, Zhanghan Yu, Zhenkai Weng, Stephen Neuendorffer et al.ICSE 2025 · 1 citation
Dusk over the sea between two cliffs drawn in fine vertical lines