z-logo
open-access-imgOpen Access
Region-based shape analysis with tracked locations
Author(s) -
Brian Hackett,
Radu Rugina
Publication year - 2005
Publication title -
acm sigplan notices
Language(s) - English
Resource type - Journals
SCImago Journal Rank - 0.31
H-Index - 99
eISSN - 1558-1160
pISSN - 0362-1340
DOI - 10.1145/1047659.1040331
Subject(s) - computer science , heap (data structure) , pointer (user interface) , pointer analysis , shape analysis (program analysis) , abstraction , static analysis , granularity , programming language , separation logic , set (abstract data type) , theoretical computer science , algorithm , artificial intelligence , philosophy , epistemology
This paper proposes a novel approach to shape analysis: using local reasoning about individual heap locations instead of global reasoning about entire heap abstractions. We present an inter-procedural shape analysis algorithm for languages with destructive updates. The key feature is a novel memory abstraction that differs from traditional abstractions in two ways. First, we build the shape abstraction and analysis on top of a pointer analysis. Second, we decompose the shape abstraction into a set of independent configurations, each of which characterizes one single heap location. Our approach: 1) leads to simpler algorithm specifications, because of local reasoning about the single location; 2) leads to efficient algorithms, because of the smaller granularity of the abstraction; and 3) makes it easier to develop context-sensitive, demand-driven, and incremental shape analyses.We also show that the analysis can be used to enable the static detection of memory errors in programs with explicit deallocation. We have built a prototype tool that detects memory leaks and accesses through dangling pointers in C programs. The experiments indicate that the analysis is sufficiently precise to detect errors with low false positive rates; and is sufficiently lightweight to scale to larger programs. For a set of three popular C programs, the tool has analyzed about 70K lines of code in less than 2 minutes and has produced 97 warnings, 38 of which were actual errors.

The content you want is available to Zendy users.

Already have an account? Click here to sign in.
Having issues? You can contact us here
Accelerating Research

Address

John Eccles House
Robert Robinson Avenue,
Oxford Science Park, Oxford
OX4 4GP, United Kingdom