paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Precise divide-by-zero detection with affirmative evidence

基于肯定性证据的精确除零检测
ICSE Proceedings of the 44th International Conference on Software Engineering2022匹配度 3/10 · 该论文是传统静态分析/抽象解释的除零检测,关注误报抑制与工业落地,与用户当前核心方向(LLM/Agent 与静态分析交叉、浮点程序分析、贝叶斯程序分析)没有直接关系;仅在广义程序分析和问题驱动、工业案例偏好上有部分契合。引用 5 inbox
Yiyuan Guo, Jinguo Zhou, Peisen Yao, Qingkai Shi, Charles Zhang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出依赖来源证据与边界证据的静态分析,在安全证明失败时主动寻找可触发线索以抑制除零误报。

除零是常见编程错误,但传统静态分析在无法证明除数在所有执行中非零时就报告缺陷,因而误报严重:在大量欠约束变量上推理程序语义时,除数的取值范围被显著放宽,安全证明容易失败,导致海量误报。本文基于对已知除零缺陷的广泛实证研究,提出不再在安全验证失败时武断报警,而是主动寻找肯定性证据,即来源证据(source evidence)与边界证据(bound evidence),用以表明该缺陷在运行时被触发的可能性很高。作者实现了工具 Wit,并在 Linux 内核等真实软件上评估,共发现 72 个新的除零缺陷,误报率低至 22%,表明该证据驱动策略能在保持较强发现能力的同时显著提升检测精度。

问题
传统静态除零检测在无法证明除数非零时即报警,欠约束变量上的界推理精度不足会导致大量误报。
方法
基于对已知除零缺陷的实证研究,提出主动搜索来源证据与边界证据两类肯定性证据,仅在证据表明缺陷很可能在运行时触发时才报告。
评估
实现工具 Wit,在 Linux 内核等真实软件上评估,发现 72 个新除零缺陷,误报率为 22%。
原文摘要(Abstract)

The static detection of divide-by-zero, a common programming error, is particularly prone to false positives because conventional static analysis reports a divide-by-zero bug whenever it cannot prove the safety property --- the divisor variable is not zero in all executions. When reasoning the program semantics over a large number of under-constrained variables, conventional static analyses significantly loose the bounds of divisor variables, which easily fails the safety proof and leads to a massive number of false positives. We propose a static analysis to detect divide-by-zero bugs taking additional evidence for under-constrained variables into consideration. Based on an extensive empirical study of known divide-by-zero bugs, we no longer arbitrarily report a bug once the safety verification fails. Instead, we actively look for affirmative evidences, namely source evidence and bound evidence, that imply a high possibility of the bug to be triggerable at runtime. When applying our tool Wit to the real-world software such as the Linux kernel, we have found 72 new divide-by-zero bugs with a low false positive rate of 22%.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{GuoZYSZ22,
  title = {Precise divide-by-zero detection with affirmative evidence},
  author = {Yiyuan Guo and Jinguo Zhou and Peisen Yao and Qingkai Shi and Charles Zhang},
  booktitle = {ICSE},
  year = {2022},
  doi = {10.1145/3510003.3510066}
}