Detecting Exception Handling Bugs in C++ Programs.
Saved in:
| Title: | Detecting Exception Handling Bugs in C++ Programs. |
|---|---|
| Authors: | Zhang, Hao1 zhanghao19@ios.ac.cn, Luo, Ji2 luoji20@otcaix.iscas.ac.cn, Hu, Mengze3 humz@ios.ac.cn, Yan, Jun4 yanjun@ios.ac.cn, Zhang, Jian4 zj@ios.ac.cn, Qiu, Zongyan5 qzy@math.pku.edu.cn |
| Source: | ICSE: International Conference on Software Engineering. 2023, p1084-1096. 13p. |
| Subjects: | Error-correcting codes, C (Computer program language), Debugging, Facebook (Web resource), Github Inc. |
| Abstract: | Exception handling is a mechanism in modern programming languages. Studies have shown that the exception handling code is error-prone. However, there is still limited research on detecting exception handling bugs, especially for C++ programs. To tackle the issue, we try to precisely represent the exception control flow in C++ programs and propose an analysis method that makes use of the control flow to detect such bugs. More specifically, we first extend control flow graph by introducing the concepts of five different kinds of basic blocks, and then modify the classic symbolic execution framework by extending the program state to a quadruple and properly processing try, throw and catch statements. Based on the above techniques, we develop a static analysis tool on the top of Clang Static Analyzer to detect exception handling bugs. We run our tool on projects with high stars from GitHub and find 36 exception handling bugs in 8 projects, with a precision of 84%. We compare our tool with four state-of-the-art static analysis tools (Cppcheck, Clang Static Analyzer, Facebook Infer and IKOS) on projects from GitHub and handmade benchmarks. On the GitHub projects, other tools are not able to detect any exception handling bugs found by our tool. On the handmade benchmarks, our tool has a significant higher recall. [ABSTRACT FROM AUTHOR] |
| Copyright of ICSE: International Conference on Software Engineering is the property of Association for Computing Machinery and its content may not be copied or emailed to multiple sites without the copyright holder's express written permission. Additionally, content may not be used with any artificial intelligence tools or machine learning technologies. However, users may print, download, or email articles for individual use. This abstract may be abridged. No warranty is given about the accuracy of the copy. Users should refer to the original published version of the material for the full abstract. (Copyright applies to all Abstracts.) | |
| Database: | Engineering Source |
|
Full text is not displayed to guests.
Login for full access.
|
|
Be the first to leave a comment!