TY - GEN
T1 - An approach to improving the structure of error-handling code in the linux kernel
AU - Saha, Suman
AU - Lawall, Julia
AU - Muller, Gilles
PY - 2011
Y1 - 2011
N2 - The C language does not provide any abstractions for exception handling or other forms of error handling, leaving programmers to devise their own conventions for detecting and handling errors. The Linux coding style guidelines suggest placing error handling code at the end of each function, where it can be reached by gotos whenever an error is detected. This coding style has the advantage of putting all of the error-handling code in one place, which eases understanding and maintenance, and reduces code duplication. Nevertheless, this coding style is not always applied. In this paper, we propose an automatic program transformation that transforms error-handling code into this style.We have applied our transformation to the Linux 2.6.34 kernel source code, on which it reorganizes the error handling code of over 1800 functions, in about 25 minutes.
AB - The C language does not provide any abstractions for exception handling or other forms of error handling, leaving programmers to devise their own conventions for detecting and handling errors. The Linux coding style guidelines suggest placing error handling code at the end of each function, where it can be reached by gotos whenever an error is detected. This coding style has the advantage of putting all of the error-handling code in one place, which eases understanding and maintenance, and reduces code duplication. Nevertheless, this coding style is not always applied. In this paper, we propose an automatic program transformation that transforms error-handling code into this style.We have applied our transformation to the Linux 2.6.34 kernel source code, on which it reorganizes the error handling code of over 1800 functions, in about 25 minutes.
UR - http://www.scopus.com/inward/record.url?scp=79955644012&partnerID=8YFLogxK
UR - http://www.scopus.com/inward/citedby.url?scp=79955644012&partnerID=8YFLogxK
U2 - 10.1145/1967677.1967684
DO - 10.1145/1967677.1967684
M3 - Conference contribution
AN - SCOPUS:79955644012
SN - 9781450305556
T3 - Proceedings of the ACM SIGPLAN Conference on Languages, Compilers, and Tools for Embedded Systems (LCTES)
SP - 41
EP - 50
BT - LCTES'11 - Proceedings of the ACM SIGPLAN/SIGBED 2011 Conference on Languages, Compilers, Tools and Theory for Embedded Systems
T2 - ACM SIGPLAN/SIGBED Conference on Languages Compilers, Tools, and Theory for Embedded Systems, LCTES 2011
Y2 - 11 April 2011 through 14 April 2011
ER -