Effective Bug Detection with Unused Definitions
Li Zhong, Chengcheng Xiang, Haochen Huang, Bingyu Shen, Eric Mugnier, Yuanyuan Zhou
Abstract
Unused definitions are values assigned to variables but not used. Since unused definitions a re u sually c onsidered redundant code causing no severe consequences except for wasting CPU cycles, system developers usually treat them as mild warnings and simply remove them. In this paper, we reevaluate the effect of unused definitions and discover that some unused definitions could indicate non-trivial bugs like security issues or data corruption, which calls for more attention from developers.
Although there are existing techniques to detect unused definitions, it is still challenging to detect critical bugs from unused definitions because only a small proportion of unused definitions are real bugs. In this paper, we present a static analysis framework ValueCheck to address the challenges of detecting bugs from unused definitions. First, we make a unique observation that the unused definitions on the boundary of developers' interactions are prone to be bugs. Second, we summarize syntactic and semantic patterns where unused definitions a re i ntentionally written, which should not be considered bugs. Third, to distill bugs from unused definitions, we adopt the code familiarity metrics from the software engineering field to rank the detected bugs, which enables developers to prioritize their focus.
We evaluate ValueCheck with large system software and libraries including Linux, MySQL, OpenSSL, and NFSganesha. ValueCheck helps detect 210 unknown bugs from these applications. 154 bugs are confirmed by developers. Compared to state-of-the-art tools, ValueCheck demonstrates to effectively detect bugs with low false positives.
• 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 a715ee1a-1c98-44e2-b2b7-adf206a5e8d5Cited by top-tier papers1
Ask how each one uses itBuilds on8
- Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints InferencesKangjie Lu, Aditya Pakki, Qiushi WuUSENIX Security 2019 · 97 citations
- PeX: A Permission Check Analysis Framework for Linux KernelTong Zhang, Wenbo Shen, Dongyoon Lee, Changhee Jung et al.USENIX Security 2019 · 77 citations
- Towards Continuous Access Control Validation and ForensicsChengcheng Xiang, Yudong Wu, Bingyu Shen, Mingyao Shen et al.CCS 2019 · 48 citations
- Finding Bugs Using Your Own Code: Detecting Functionally-similar yet Inconsistent CodeMansour Ahmadi, Reza Mirzazade Farkhani, Ryan Williams, Long LuUSENIX Security 2021 · 41 citations
- Protecting Data Integrity of Web Applications with Database Constraints Inferred from Application CodeHaochen Huang, Bingyu Shen, Li Zhong, Yuanyuan ZhouASPLOS 2023 · 16 citations
Related papers
- A large-scale study of usability criteria addressed by static analysis toolsMarcus Nachtigall, Michael Schlichtig, Eric BoddenISSTA 2022 · 38 citations
- An empirical study on the effectiveness of static C code analyzers for vulnerability detectionStephan Lipp, Sebastian Banescu, Alexander PretschnerISSTA 2022 · 99 citations
- Balancing Analysis Time and Bug Detection: Daily Development-friendly Bug Detection in LinuxKeita Suzuki, Kenta Ishiguro, Kenji KonoUSENIX ATC 2024 · 6 citations
- LChecker: Detecting Loose Comparison Bugs in PHPPenghui Li, Wei MengWWW 2021 · 22 citations
- Path-sensitive and alias-aware typestate analysis for detecting OS bugsTuo Li, Jia-Ju Bai, Yulei Sui, Shi-Min HuASPLOS 2022 · 16 citations
