Interprocedural path-sensitive resource leaks detection for C programs

  • Authors:
  • Xiujuan Ji;Jufeng Yang;Jing Xu;Lei Feng;Xiaohong Li

  • Affiliations:
  • Nankai University, Tianjin, China;Nankai University, Tianjin, China;Nankai University, Tianjin, China;Nankai University, Tianjin, China;Nankai University, Tianjin, China

  • Venue:
  • Proceedings of the Fourth Asia-Pacific Symposium on Internetware
  • Year:
  • 2012

Quantified Score

Hi-index 0.00

Visualization

Abstract

In this paper, we present a new tool, RL_Detector, which performs static analysis to detect resource leaks for C programs. The algorithm is inter-procedural and path-sensitive, and it is based on an underlying resource management property: the data flow from resource allocation point must reach resource deallocation point, otherwise the resource is leaked. For each resource, it symbolically executes the program to collect the constraints of all the paths and recorded as some sets. Then the data flow condition can be computed through these sets of all the paths. Finally, the resource leak detection is reduced to the satisfiability of DFC (the Data Flow Condition). It has been effective at detecting resource leak in the SPEC2000 benchmarks and in an open source software project, the actual test results show that the tool keeps the false positive rate below 10% and works on millions of lines of code in a matter of minutes.