Sciweavers

ECOOPWEXCEPTION
2006
Springer

Exception-Handling Bugs in Java and a Language Extension to Avoid Them

13 years 8 months ago
Exception-Handling Bugs in Java and a Language Extension to Avoid Them
It is difficult to write programs that behave correctly in the presence of exceptions. We describe a dataflow analysis for finding a certain class of mistakes made while programs handle exceptions. These mistakes involve resource leaks and failures to restore program-specific invariants. Using this analysis we have found over 1,200 bugs in 4 million lines of Java. We give some evidence of the importance of the bugs we found and use them to highlight some limitations of destructors and finalizers. We propose and evaluate a new language feature, the compensation stack, to make it easier to write solid code in the presence of exceptions. These compensation stacks track obligations and invariants at run-time. Two case studies demonstrate that they can yield more natural source code and more consistent behavior in long-running programs.
Westley Weimer
Added 22 Aug 2010
Updated 22 Aug 2010
Type Conference
Year 2006
Where ECOOPWEXCEPTION
Authors Westley Weimer
Comments (0)