Skip to Main content Skip to Navigation

Improving the Quality of Error-Handling Code in Systems Software using Function-Local Information

Suman Saha 1
1 Regal - Large-Scale Distributed Systems and Applications
LIP6 - Laboratoire d'Informatique de Paris 6, Inria Paris-Rocquencourt
Abstract : In C, a typical strategy for implementing error handling code is to follow each operation that may encounter an error by a conditional that checks for an error result and, if one is found, performs the appropriate cleanup operations before returning from the function. This basic strategy, however, is itself error-prone, as it is easy to overlook some cleanup operations that are required, and to forget to update some existing error handling code when the function is extended with new operations that need to be undone in an error case. Furthermore, there may be substantial code duplication, as the same error handling code may be needed at many places within a function definition. One style of programming, goto-based strategy, that can somewhat alleviate these difficulties. To improve the structure of error handling code in the system software, we define an algorithm to transform error handling code implemented according to the basic strategy so that it follows the goto-based strategy. Even when error handling code is structured, the management of the releasing of allocated resources remains a continual problem in ensuring the robustness of systems code. In this thesis, we propose a microscopic resource-release omission fault finding algorithm, based on a mostly intraprocedural, flow and path-sensitive analysis, that targets and exploits the properties of error-handling code. Our algorithm is resistant to false positives in the set of resource acquisition and release operations, resulting in a low rate of false positives in the fault reports, and is highly scalable.
Complete list of metadata

Cited literature [4 references]  Display  Hide  Download
Contributor : Suman Saha <>
Submitted on : Tuesday, January 28, 2014 - 7:22:36 PM
Last modification on : Friday, January 8, 2021 - 5:46:03 PM
Long-term archiving on: : Sunday, April 9, 2017 - 1:53:19 AM


  • HAL Id : tel-00937807, version 1


Suman Saha. Improving the Quality of Error-Handling Code in Systems Software using Function-Local Information. Programming Languages [cs.PL]. Université Pierre et Marie Curie - Paris VI, 2013. English. ⟨tel-00937807⟩



Record views


Files downloads