paperbot · PL 论文追踪

全部论文 待读 收藏

P2 FLUX: Finding Bugs with LLVM IR Based Unit Test Crossovers

FLUX:基于 LLVM IR 单元测试交叉组合的缺陷发现
ASE 2023 38th IEEE/ACM International Conference on Automated Software Engineering (ASE)2023匹配度 2/10 · 论文提出基于 LLVM IR 单元测试交叉生成的编译器模糊测试方法,属于动态测试而非静态分析,且完全不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析,与用户核心研究方向匹配度低。引用 7 inbox
Eric Liu, Shengjie Xu, David Lie
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 FLUX,以人工 LLVM IR 单元测试为种子随机组合生成测试,暴露编译器优化缺陷。

编译器优化缺陷会导致编译产物行为异常,但已有编译器 fuzzing 多面向端到端流程,难以定向探索优化。FLUX 不从头构造良构输入,而以人工编写的单元测试套件为起点,随机选择并组合测试来生成新测试,以探索优化中的新执行路径并发现缺陷。作者在 LLVM 上评估:相比基线单元测试套件提升路径覆盖率,并比先前工作覆盖更多边;可生成触发误编译和崩溃的 IR。一个月 fuzzing 中,FLUX 在 LLVM 活跃开发分支发现 28 个唯一缺陷,报告 11 个,其中 6 个被修补;22 个为良构输入触发的崩溃,6 个为静默产生错误代码的误编译。

问题
已有编译器 fuzzing 受限于构造良构输入且偏端到端,难以针对编译器优化进行定向探索;编译器优化中的缺陷可能导致误编译或崩溃。
方法
FLUX 以人工编写的 LLVM IR 单元测试套件为种子,随机选择并组合多个测试生成新测试,从而绕过良构输入的构造约束并压测优化。
评估
在 LLVM 上评估路径/边覆盖率,并统计发现的崩溃与误编译;一个月 fuzzing 发现 28 个唯一缺陷,报告 11 个,6 个被修补。
原文摘要(Abstract)

Optimizing compilers are as ubiquitous as they are crucial to software development. However, bugs in compilers are not uncommon. Among the most serious are bugs in compiler optimizations, which can cause unexpected behavior in compiled binaries. Existing approaches for detecting such bugs have focused on end-to-end compiler fuzzing, which limits their ability for targeted exploration of a compiler's optimizations. This paper proposes FLUX (Finding bugs with LLVM IR based Unit test cross(X)overs), a fuzzer that is designed to generate test cases that stress compiler optimizations. Previous compiler fuzzers are overly constrained by having to construct well-formed inputs. FLUX sidesteps this constraint by using human-written unit test suites as a starting point, and then selecting random combinations of them to generate new tests. We hypothesize that tests generated this way will be able to explore new execution paths through compiler optimizations and find new bugs. Our evaluation of FLUX on LLVM indicates that it is able to increase path coverage over the baseline LLVM unit test suite and explores more edge coverage than previous work. Further, we demonstrate FLUX's ability to generate miscompiled and crash-producing IR on LLVM's optimizations. After a month of fuzzing, FLUX found 28 unique bugs in LLVM's active development branch. We have reported 11 of these bugs which led to 6 of them being patched by LLVM developers. 22 of these are crashes that are triggered by well-formed input programs, and 6 of these are miscompilation bugs that silently produced incorrect code.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{LiuXL23,
  title = {FLUX: Finding Bugs with LLVM IR Based Unit Test Crossovers},
  author = {Eric Liu and Shengjie Xu and David Lie},
  booktitle = {ASE},
  year = {2023},
  doi = {10.1109/ase56229.2023.00100}
}