An approach to improving the structure of error-handling code in the Linux kernel - Archive ouverte HAL
Communication Dans Un Congrès Année : 2011

An approach to improving the structure of error-handling code in the Linux kernel

Résumé

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.
Fichier non déposé

Dates et versions

hal-01286601 , version 1 (11-03-2016)

Identifiants

Citer

Suman Saha, Julia L. Lawall, Gilles Muller. An approach to improving the structure of error-handling code in the Linux kernel. ACM SIGPLAN/SIGBED 2011 conference on Languages, compilers, and tools for embedded systems, Apr 2011, Chicago, IL, United States. pp.41-50, ⟨10.1145/1967677.1967684⟩. ⟨hal-01286601⟩
145 Consultations
0 Téléchargements

Altmetric

Partager

More