A Modular Framework for Stack-Heap and Value Abstractions (Extended Version)
Giacomo Boldini, Luca Negrini, Luca Olivieri, Pietro Ferrara
Abstract
Advanced static program analysis requires reasoning on the semantics of non-trivial program behaviors (e.g., pointers and complex data structures such as lists and sets, functions, and objects) and how they affect the memory. In most programming languages, static and dynamic allocations are typically managed by the stack and the heap, respectively. However, how allocations behave and how the memory is managed at runtime can vary significantly depending on the programming language being analyzed. Proper handling of these aspects is essential, as an accurate memory model enables the detection of critical issues such as buffer overflows and underflows, use-after-free errors, and null pointer exceptions prior to execution, that is, before such erroneous behaviors occur. In this paper, we propose and formalize a generic memory framework to handle stack and heap memory during the analysis, that is able to support various behaviors from different programming languages (e.g., C, C++, Java, and Python), while remaining parametric, allowing different memory and value analyses to be independently chosen and combined. It relies on the Abstract Interpretation theory and enables sound approximation of different memory models and program behaviors. We introduce a split state abstraction that separates value and memory analyses into two modular abstract domains. These domains interact through a set of memory identifiers, along with a set of operations defined by the domains to manipulate them, allowing the framework to capture both value information and structural memory relationships.
Create a lesson
Metadata
- Categories
- cs.PL, cs.SE
Related papers
Validating Concurrent Correctness Witnesses with Ghosts by Thread-Modular Abstract Interpretation (Extended Version)
Shared title terminologycs.PLMichael Schwarz, Zhendong Ang, Umang Mathur
Compositional Symbolic Execution à la Carte (Extended Version)
Shared title terminologycs.PLSacha-Élie Ayoun, Andreas Lööw, Seung Hoon Park et al.
An End-to-End Theory for Compositional Symbolic Execution: From Expressive Specifications to SMT (Extended Version)
Shared title terminologycs.PLShivanandan Tamil Kumaran, Andreas Lööw, Philippa Gardner
On the Expressive Power of Hook-Indexed State: Comprehending State in the React UI Library (Extended Version)
Shared title terminologycs.PLToby Ueno, Ezra Cooper, Simon Fowler et al.
On the Expressiveness of Asynchronous Processes with Nested Session Types (Extended Version)
Shared title terminologycs.PLSjors Wortelboer, Dan Frumin, Jorge A. Pérez
Beyond Locks and Thread IDs: Static Data Race Detection Off The Beaten Path (Extended Version)
Shared title terminologycs.PLDaniel Bund, Julian Erhard, Michael Petter et al.