Cut to the Chase: An Error-Oriented Approach to Detect Error-Handling Bugs
Haoran Liu, Zhouyang Jia, Shanshan Li, Yan Lei, Yue Yu, Yu Jiang, Xiaoguang Mao, Xiangke Liao
Abstract
Error-handling bugs are prevalent in software systems and can result in severe consequences. Existing works on error-handling bug detection can be categorized into template-based and learning-based approaches. The former requires much human effort and is difficult to accommodate the software evolution. The latter usually focuses on errors of API and assumes that error handling should be right after the handled error. Such an assumption, however, may affect both learning and detecting phases.
The existing learning-based approaches can be regarded as API-oriented, which starts from an API and learns if the API requires error handling. In this paper, we propose EH-Digger, an ERROR-oriented approach, which starts from an error handling. Our approach can learn why the error occurs and when the error has to be handled. We conduct a comprehensive study on 2,322 error-handling code snippets from 22 widely used software systems across 8 software domains to reveal the limitation of existing approaches and guide the design of EH-Digger. We evaluated EH-Digger on the Linux Kernel and 11 open-source applications. It detected 53 new bugs confirmed by the developers and 71 historical bugs fixed in the latest versions. We also compared EH-Digger with three state-of-the-art approaches, 30.1% of bugs detected by EH-Digger cannot be detected by the existing approaches.
Ask Lune
Know this paper in minutes, not an afternoon.
Lune can read every page of it and the top-tier papers that cite it, and gives you its claims, its evidence and its limits, each one cited to the paper it comes from. No skimming, no AI slop.
1 top-tier paper has cited it since. Know what they found before your reviewers do.
Lune can draw on
the full paper · the top-tier papers that cite it · related work
Free to start. No credit card required.
Lineage
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis cites Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis cites Automatically Detecting Error Handling Bugs Using Error Specifications
- Exaggerated Error Handling Hurts! An In-Depth Study and Context-Aware Detection cites Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
- Error Delayed Is Not Error Handled: Understanding and Fixing Propagated Error-Handling Bugs cites Exaggerated Error Handling Hurts! An In-Depth Study and Context-Aware Detection
- Error Delayed Is Not Error Handled: Understanding and Fixing Propagated Error-Handling Bugs cites Automatically Detecting Error Handling Bugs Using Error Specifications
- Error Delayed Is Not Error Handled: Understanding and Fixing Propagated Error-Handling Bugs cites Understanding and Detecting Disordered Error Handling with Precise Function Pairing
- Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences cites Automatically Detecting Error Handling Bugs Using Error Specifications
- Understanding and Detecting Disordered Error Handling with Precise Function Pairing cites Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type Analysis
- Understanding and Detecting Disordered Error Handling with Precise Function Pairing cites Exaggerated Error Handling Hurts! An In-Depth Study and Context-Aware Detection
- Understanding and Detecting Disordered Error Handling with Precise Function Pairing cites Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints Inferences
- Understanding and Detecting Disordered Error Handling with Precise Function Pairing cites Automatically Detecting Error Handling Bugs Using Error Specifications
Cited by top-tier papers1
Builds on9
- Where Does It Go?: Refining Indirect-Call Targets with Multi-Layer Type AnalysisKangjie Lu, Hong HuCCS 2019 · 142 citations
- Detecting Missing-Check Bugs via Semantic- and Context-Aware Criticalness and Constraints InferencesKangjie Lu, Aditya Pakki, Qiushi WuUSENIX Security 2019 · 97 citations
- Automatically Detecting Error Handling Bugs Using Error SpecificationsSuman Jana, Yuan Jochen Kang, Samuel Roth, Baishakhi RayUSENIX Security 2016 · 79 citations
- Understanding and Detecting Disordered Error Handling with Precise Function PairingQiushi Wu, Aditya Pakki, Navid Emamdoost, Stephen McCamant et al.USENIX Security 2021 · 31 citations
- Exaggerated Error Handling Hurts! An In-Depth Study and Context-Aware DetectionAditya Pakki, Kangjie LuCCS 2020 · 17 citations
Related papers
- Detecting API Post-Handling Bugs Using Code and Description in PatchesMiaoqian Lin, Kai Chen, Yang XiaoUSENIX Security 2023
- Inference of Error Specifications and Bug Detection Using Structural SimilaritiesNora Dossche, Bart CoppensUSENIX Security 2024 · 2 citations
- IFIZZ: Deep-State and Efficient Fault-Scenario Generation to Test IoT FirmwarePeiyu Liu, Shouling Ji, Xuhong Zhang, Qinming Dai et al.ASE 2021 · 16 citations
- Compiler-directed Migrating API Callsite of Client CodeHao Zhong, Na MengICSE 2024 · 5 citations
- Towards Low-Resource Automatic Program Repair with Meta-Learning and Pretrained Language ModelsWeishi Wang, Yue Wang, Steven C. H. Hoi, Shafiq JotyEMNLP 2023 · 2 citations
