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 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 papers1
Ask how each one uses itBuilds 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
