Precise Divide-By-Zero Detection with Affirmative Evidence
Yiyuan Guo, Jinguo Zhou, Peisen Yao, Qingkai Shi, Charles Zhang
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%. CCS CONCEPTS • Software and its engineering → Software verification and validation.
Ask about this paper
Your agent reads all of it.
Lune indexed this paper to the last equation, along with the top-tier papers that cite it. Ask a question and the answer quotes them.
Your agent calls
Luneget_paper_fulltext
Free to start. No credit card required.
Terminal
Install the CLIlune papers fulltext 6244efa5-c5ce-4244-a31b-975c4f73ce52Builds on2
- Learning fast and precise numerical analysisJingxuan He, Gagandeep Singh, Markus Püschel, Martin T. VechevPLDI 2020 · 18 citations
- Automatically Tailoring Abstract Interpretation to Custom Usage ScenariosMuhammad Numair Mansur, Benjamin Mariano, Maria Christakis, Jorge A. Navas et al.CAV 2021 · 5 citations
Related papers
- KUBO: Precise and Scalable Detection of User-triggerable Undefined Behavior Bugs in OS KernelChangming Liu, Yaohui Chen, Long LuNDSS 2021
- Validating static warnings via testing code fragmentsAshwin Kallingal Joshy, Xueyuan Chen, Benjamin Steenhoek, Wei LeISSTA 2021 · 10 citations
- BESA: Extending Bugs Triggered by Runtime Testing via Static AnalysisJia-Ju BaiEuroSys 2025 · 1 citation
- Bridging Coverage and Confidence: Reliable Static False Alarm Elimination via Input-AgnosticityJiayi Wang, Yu Wang, Linzhang Wang, Ke WangPLDI 2026
- Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints InferencesKangjie Lu, Aditya Pakki, Qiushi WuUSENIX Security 2019 · 97 citations
