paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Closer to the edge

更接近边缘
ASE Proceedings of the 35th IEEE/ACM International Conference on Automated Software Engineering2020匹配度 2/10 · 该论文属于编译器随机测试与未定义行为(UB)检测,使用动态分析消除Csmith冗余安全包装器,与用户核心方向(静态分析/形式化验证与LLM交叉、浮点程序分析、贝叶斯程序分析)没有直接关联;仅在PL/编译器测试层面有边缘相关性。引用 15 inbox
Karine Even-Mendoza, Cristian Cadar, Alastair F. Donaldson
crossref: 2026-09-12

AI 速览

一句话:通过动态分析消除 Csmith 冗余安全包装器,生成更接近 UB 边缘但无 UB 的程序,发现 GCC 新误编译错误。

随机化编译器测试需要能生成无未定义行为(UB)的程序,以可靠暴露误编译错误。现有生成器如 Csmith 为达到 UB-free 而严重限制程序形式,可能降低测试覆盖。作者提出生成限制更少、但仍无 UB、即更接近 UB 边缘却未越界的程序。其原型工具 CsmithEdge 使用简单动态分析,判断 Csmith 在算术操作的安全数学包装器使用上何处过于保守,并消除冗余包装器。评估中,CsmithEdge 在 GCC 上发现两个常规 Csmith 密集测试无法发现的误编译错误,并在代码覆盖上取得显著差异。

问题
随机化编译器测试需要无 UB 的程序才能可靠发现误编译错误;既有 Csmith 等生成器为保持 UB-free 过度限制程序形式,可能限制测试覆盖。
方法
提出 CsmithEdge 原型,用简单动态分析识别 Csmith 中保证算术 UB-free 的安全数学包装器哪些冗余,并移除冗余包装器,从而生成更接近 UB 边缘但仍无 UB 的程序。
评估
在 GCC 上与常规 Csmith 对比,CsmithEdge 发现两个常规密集测试未发现的误编译错误,并在代码覆盖上产生显著差异。
原文摘要(Abstract)

Randomised compiler testing techniques require a means of generating programs that are free from undefined behaviour (UB) in order to reliably reveal miscompilation bugs. Existing program generators such asCsmithheavily restrict the form of generated programs inorder to achieve UB-freedom. We hypothesise that the idiomatic nature of such programs limits the test coverage they can offer. Our idea is to generate less restricted programs that are still UB-free—programs that get closer to the edge of UB, but that do not quite cross the edge. We present preliminary support for our idea via a prototype tool, CsmithEdge, which uses simple dynamic analysis to determine whereCsmithhas been too conservative in its use of safe math rappers that guarantee UB-freedom for arithmetic operations. By eliminating redundant wrappers,CsmithEdge was able to discover two new miscompilation bugs in GCC that could not be found via intensive testing using regular Csmith, and to achieve substantial differences in code coverage on GCC compared with regular Csmith.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5900,
  title = {Closer to the edge},
  author = {Karine Even-Mendoza and Cristian Cadar and Alastair F. Donaldson},
  booktitle = {ASE},
  year = {2020},
  doi = {10.1145/3324884.3418933}
}