State-taint analysis for detecting resource bugs
State-taint analysis for detecting resource bugs
复制标题
用于检测资源错误的状态污点分析
DOI:
10.1016/j.scico.2017.06.010
复制
发表时间:
2018
影响因子:
1.3
通讯作者:
Qin Shengchao
中科院分区:
文献类型:
--
作者:
Xu Zhiwu;Wen Cheng;Qin Shengchao
To ensure that a program uses its resources in an appropriate manner is vital for program correctness. A number of solutions have been proposed to check that programs meet such a property on resource usage. But many of them are sophisticated to use for resource bug detection in practice and do not take into account the expectation that a resource should be used once it is opened or required. Thisopen-but-not-usedproblem can cause resource starvation in some cases, for example, smartphones or other mobile devices where resources are not only scarce but also energy-hungry, hence inappropriate resource usage can not only cause the system to run out of resources but also lead to much shorter battery life between battery recharge. That is the so-callenergy leakproblem.In this paper, we propose a static analysis calledstate-taint analysisto detect resource bugs. Taking theopen-but-not-usedproblem into account, we specify the appropriate usage of resources in terms of resource protocols. We then propose a taint-like analysis which employs resource protocols to guide resource bug detection. As an extension and an application, we enrich the protocols with the inappropriate behaviours that may cause energy leaks, and use the refined protocols to guide the analysis for energy leak detection. We implement the analysis as a prototype tool calledstatedroid. Using this tool, we conduct experiments on several real Android applications and test datasets from Relda and GreenDroid. The experimental results show that our tool is precise, helpful and suitable in practice, and can detect more energy leak patterns.