A generic memory framework to handle stack and heap memory during the analysis is proposed and formalized, able to support various behaviors from different programming languages while remaining parametric, allowing different memory and value analyses to be independently chosen and combined.
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.
Programming languages differ significantly in how subprogram calls and runtime stack
management are implemented, which reflects underlying variations in execution models,
design philosophies, and performance objectives. This study systematically compares
subprogram call implementation across four widely used languag...
A. Adewole· International Journal of Com...· 0 citations
A translation from regions to continuation marks is provided and what this connection could entail for both languages with region-based memory management and the authors' favourite Schemes (and Racket) with continuation marks is theorized.
Paulette Koronkevich, William J. Bowman· Proceedings of the 27th ACM...· 0 citations
CPyGraph, a C++ framework for package-level analysis of native CPython bytecode, is presented, a C++ framework for package-level analysis of native CPython bytecode that matches PyCG on its 112-program call-graph benchmark.
Detecting memory errors in C/C++ by static analysis means reasoning about program values and memory structure together, but value- and memory-oriented analyses are usually combined in fixed, domain-specific ways. This work proposes a modular, parametric framework, based on abstract interpretation theory, with a split-s...
Giacomo Boldini· Companion Proceedings of the...· 0 citations
CPL is presented, a compact C-like systems language that retains C's direct access to memory, layout, and machine interfaces while experimenting with a smaller grammar and selected conveniences from newer languages, and whether C-like are more convenient to use for compiler experiments than modern approaches and paradi...
N. Fot, A. Vinarsky· 0 citations
We use cookies to run the site and, with your consent, for analytics and to show ads.
See our Cookie Policy.