DocumentCode
596234
Title
Light-Weight Test Oracles for Resource Leaks Based on Finalizers
Author
Ziying Dai ; Xiaoguang Mao ; Yuhua Qi ; Kerong Ben
Author_Institution
Sch. of Comput., Nat. Univ. of Defense Technol., Changsha, China
Volume
2
fYear
2012
fDate
4-7 Dec. 2012
Firstpage
73
Lastpage
79
Abstract
Garbage collectors automatically manage memory in an elegant way. However, finalization performs poorly in reclaiming finite system resources such as file descriptors and database connections, especially in Java. Resource leaks degrade application performance and can even result in system crashes. Unfortunately, it is hard to test resource leaks because they have no immediate symptoms. In this paper, we first investigate Java API classes for the usage of finalizers. Based on the common usage pattern of these finalizers, we then propose a lightweight, easy-to-use yet effective resource leak testing approach called Orbaf. Orbaf instruments resource classes to inspect whether the cleanup method of a resource object is called before its finalizer´s execution. Test cases are also optionally instrumented to improve the incidence of object finalization. Orbaf can detect leaks of most system resources and does not require any formal specifications. It can be handily used by common software developers. Experiments show that Orbaf has high effectiveness and low overhead.
Keywords
Java; program testing; resource allocation; storage management; Java API class; Orbaf; cleanup method; common usage pattern; database connection; file descriptors; finalizer; finite system resource reclaiming; garbage collector; leak detection; light-weight test oracle; memory management; object finalization; resource leak testing approach; Abstracts; Benchmark testing; Computer bugs; Instruments; Java; Runtime; Java; Test oracles; finalization; resource leaks;
fLanguage
English
Publisher
ieee
Conference_Titel
Software Engineering Conference (APSEC), 2012 19th Asia-Pacific
Conference_Location
Hong Kong
ISSN
1530-1362
Print_ISBN
978-1-4673-4930-7
Type
conf
DOI
10.1109/APSEC.2012.27
Filename
6462784
Link To Document