TY - JOUR
T1 - PF-Miner
T2 - A practical paired functions mining method for Android kernel in error paths
AU - Liu, Hu Qiu
AU - Wang, Yu Ping
AU - Bai, Jia Ju
AU - Hu, Shi Min
N1 - Publisher Copyright:
© 2016 Elsevier Inc.
PY - 2016/11/1
Y1 - 2016/11/1
N2 - Generally, drivers have many errors to handle, and the functions called in the normal execution paths and error handling paths are in pairs, which are named as paired functions. However, some developers do not handle the errors completely as they forget or unaware of releasing the acquired resources, thus memory leaks and other potential problems can be easily introduced into the system. Therefore, it is highly valuable to automatically extract paired functions and detect violations for programmers. This paper proposes an efficient tool named PF-Miner, which can automatically extract paired functions and detect violations between normal execution paths and error handling paths from the source code of drivers with the data mining and statistical methods. We have evaluated PF-Miner on two different versions of Android kernel 2.6.39 and 3.10.0, and 81 bugs reported by PF-Miner in 2.6.39 have been fixed before the latest version 3.10.0. PF-Miner only needs about 150 s to analyze the source code of 3.10.0, and 983 violations have been detected from 546 paired functions which have been extracted. We have reported the top 51 violations as potential bugs to the developers, and 15 bugs have been confirmed so far.
AB - Generally, drivers have many errors to handle, and the functions called in the normal execution paths and error handling paths are in pairs, which are named as paired functions. However, some developers do not handle the errors completely as they forget or unaware of releasing the acquired resources, thus memory leaks and other potential problems can be easily introduced into the system. Therefore, it is highly valuable to automatically extract paired functions and detect violations for programmers. This paper proposes an efficient tool named PF-Miner, which can automatically extract paired functions and detect violations between normal execution paths and error handling paths from the source code of drivers with the data mining and statistical methods. We have evaluated PF-Miner on two different versions of Android kernel 2.6.39 and 3.10.0, and 81 bugs reported by PF-Miner in 2.6.39 have been fixed before the latest version 3.10.0. PF-Miner only needs about 150 s to analyze the source code of 3.10.0, and 983 violations have been detected from 546 paired functions which have been extracted. We have reported the top 51 violations as potential bugs to the developers, and 15 bugs have been confirmed so far.
KW - Error path checking
KW - Paired function mining
KW - Violations detection
UR - http://www.scopus.com/inward/record.url?scp=84960539328&partnerID=8YFLogxK
U2 - 10.1016/j.jss.2016.02.007
DO - 10.1016/j.jss.2016.02.007
M3 - Article
AN - SCOPUS:84960539328
SN - 0164-1212
VL - 121
SP - 234
EP - 246
JO - Journal of Systems and Software
JF - Journal of Systems and Software
ER -