paperbot · PL 论文追踪

全部论文 待读 收藏

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

AsFuzzer:基于错误驱动语法推断的汇编器差分测试
ISSTA Proceedings of the 33rd ACM SIGSOFT International Symposium on Software Testing and Analysis2024匹配度 3/10 · 该论文关注汇编器的差分测试与错误驱动的语法推断,属于编译器工具链测试方向,但并未涉及用户核心的静态分析、LLM/Agent、浮点程序分析或贝叶斯程序分析。仅在 PL/编译器工程层面有间接关联,因此匹配度较低。引用 4 inbox
Hyungseok Kim, Soomin Kim, Jungwoo Lee, Sang Kil Cha
crossref: 2026-09-12

AI 速览

一句话:提出利用汇编器错误消息自动推断语法规则并差分测试汇编器的方法与工具 AsFuzzer。

汇编器是编译器工具链的关键组件,但其测试覆盖远不如其他组件。现有基于语法的模糊测试难以测试汇编器:不同汇编器语法不同且缺少语法规范,闭源汇编器又难以从源码提取语法,而黑盒语法推断方法存在可扩展性问题。本文提出利用汇编器错误消息自动推断语法规则的方法,只需对目标汇编器进行少量查询即可获得其语法,并据此开展差分测试。作者实现工具 AsFuzzer,在 Clang、GAS、ICC 和 MASM 四个真实汇编器上评估,针对六种流行架构发现 497 个有缺陷的指令操作码,并已报告给开发者。

问题
汇编器作为编译器工具链关键组件缺乏充分测试;现有基于语法的模糊测试面临语法差异、缺少规范以及闭源汇编器语法难以提取等困难。
方法
利用汇编器错误消息中的信息,以少量查询自动推断其底层语法规则,并基于推断出的语法生成测试进行差分测试。
评估
在 Clang、GAS、ICC、MASM 四个真实汇编器上评估,针对六种流行架构发现 497 个有缺陷的指令操作码并提交给开发者。
原文摘要(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.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot8603,
  title = {AsFuzzer: Differential Testing of Assemblers with Error-Driven Grammar Inference},
  author = {Hyungseok Kim and Soomin Kim and Jungwoo Lee and Sang Kil Cha},
  booktitle = {ISSTA},
  year = {2024},
  doi = {10.1145/3650212.3680345}
}