Validating static warnings via testing code fragments
Ashwin Kallingal Joshy, Xueyuan Chen, Benjamin Steenhoek, Wei Le
Abstract
Static analysis is an important approach for finding bugs and vulnerabilities in software. However, inspecting and confirming static warnings are challenging and time-consuming. In this paper, we present a novel solution that automatically generates test cases based on static warnings to validate true and false positives. We designed a syntactic patching algorithm that can generate syntactically valid, semantic preserving executable code fragments from static warnings. We developed a build and testing system to automatically test code fragments using fuzzers, KLEE and Valgrind. We evaluated our techniques using 12 real-world C projects and 1955 warnings from two commercial static analysis tools. We successfully built 68.5% code fragments and generated 1003 test cases. Through automatic testing, we identified 48 true positives and 27 false positives, and 205 likely false positives. We matched 4 CVE and real-world bugs using Helium, and they are only triggered by our tool but not other baseline tools. We found that testing code fragments is scalable and useful; it can trigger bugs that testing entire programs or testing procedures failed to trigger. CCS CONCEPTS • Software and its engineering → Software testing and debugging; Software verification and validation; Software defect analysis.
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.
Cited by top-tier papers7
- Combining static analysis error traces with dynamic symbolic execution (experience paper)Frank Busse, Pritam M. Gharat, Cristian Cadar, Alastair F. DonaldsonISSTA 2022 · 11 citations
- Sound and Partially-Complete Static Analysis of Data-Races in GPU ProgramsDennis Liew, Tiago Cogumbreiro, Julien LangeOOPSLA 2024 · 10 citations
- FuzzSlice: Pruning False Positives in Static Analysis Warnings through Function-Level FuzzingAniruddhan Murali, Noble Saji Mathews, Mahmoud Alfadel, Meiyappan Nagappan et al.ICSE 2024 · 9 citations
- An Empirical Study of Suppressed Static Analysis WarningsHuimin Hu, Yingying Wang, Julia Rubin, Michael PradelFSE 2025 · 1 citation
- CodeCureAgent: Automatic Classification and Repair of Static Analysis WarningsPascal Joos, Islem Bouzenia, Michael PradelFSE 2026
Related papers
- An empirical study on the effectiveness of static C code analyzers for vulnerability detectionStephan Lipp, Sebastian Banescu, Alexander PretschnerISSTA 2022 · 99 citations
- LAVA: Large-Scale Automated Vulnerability AdditionBrendan Dolan-Gavitt, Patrick Hulin, Engin Kirda, Tim Leek et al.S&P 2016 · 354 citations
- Precise Divide-By-Zero Detection with Affirmative EvidenceYiyuan Guo, Jinguo Zhou, Peisen Yao, Qingkai Shi et al.ICSE 2022 · 4 citations
- Statfier: Automated Testing of Static Analyzers via Semantic-Preserving Program TransformationsHuaien Zhang, Yu Pei, Junjie Chen, Shin Hwei TanFSE 2023 · 15 citations
- Constraint-Based Test Oracles for Program AnalyzersMarkus Fleischmann, David Kaindlstorfer, Anastasia Isychev, Valentin Wüstholz et al.ASE 2024 · 2 citations
