Conditional Correlation Analysis for Safe Region-based Memory Management

被引:5
|
作者
Wang, Xi [1 ]
Xu, Zhilei [1 ]
Liu, Xuezheng [2 ]
Guo, Zhenyu [2 ]
Wang, Xiaoge [1 ]
Zhang, Zheng [2 ]
机构
[1] Tsinghua Univ, Beijing, Peoples R China
[2] Microsoft Res Asia, Beijing, Peoples R China
关键词
region; conditional correlation; program analysis; error detection; memory management;
D O I
10.1145/1375581.1375588
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
Region-based memory management is a popular scheme in systems software for better organization and performance. In the scheme, a developer constructs a hierarchy of regions of different lifetimes and allocates objects in regions. When the developer deletes a region, the runtime will recursively delete all its subregions and simultaneously reclaim objects in the regions. The developer must construct a consistent placement of objects in regions; otherwise, if a region that contains pointers to other regions is not always deleted before pointees, an inconsistency will surface and cause dangling pointers, which may lead to either crashes or leaks. This paper presents a static analysis tool RegionWiz that can find such lifetime inconsistencies in large C programs using regions. The tool is based on an analysis framework that generalizes the relations and constraints over regions and objects as conditional correlations. This framework allows a succinct formalization of consistency rules for region lifetimes, preserving memory safety and avoiding dangling pointers. RegionWiz uses these consistency rules to implement an efficient static analysis to compute the conditional correlation and reason about region lifetime consistency; the analysis is based on a context-sensitive, field-sensitive pointer analysis with heap cloning, Experiments with applying RegionWiz to six real-world software packages (including the RC compiler, Apache web server, and Subversion version control system) with two different region-based memory management interfaces show that RegionWiz can reason about region lifetime consistency in large C programs. The experiments also show that RegionWiz can find several previously unknown inconsistency bugs in these packages.
引用
收藏
页码:45 / +
页数:3
相关论文
共 50 条
  • [21] A Formal Soundness Proof of Region-Based Memory Management for Object-Oriented Paradigm
    Craciun, Florin
    Qin, Shengchao
    Chin, Wei-Ngan
    [J]. FORMAL METHODS AND SOFTWARE ENGINEERING, PROCEEDINGS, 2008, 5256 : 126 - +
  • [22] Proposal and Analysis of Region-based Location Service Management Protocol for VANETs
    Saleet, Hanan
    Langar, Rami
    Basir, Otman
    Boutaba, Raouf
    [J]. GLOBECOM 2008 - 2008 IEEE GLOBAL TELECOMMUNICATIONS CONFERENCE, 2008,
  • [23] Distributed Processing of Spatial Alarms: A Safe Region-based Approach
    Bamba, Bhuvan
    Liu, Ling
    Iyengar, Arun
    Yu, Philip S.
    [J]. 2009 29TH IEEE INTERNATIONAL CONFERENCE ON DISTRIBUTED COMPUTING SYSTEMS, 2009, : 207 - +
  • [24] Abstract Interpretation of LLVM with a Region-Based Memory Model
    Gurfinkel, Arie
    Navas, Jorge A.
    [J]. SOFTWARE VERIFICATION, 2022, 13124 : 122 - 144
  • [25] RSVM: a Region-based Software Virtual Memory for GPU
    Ji, Feng
    Lin, Heshan
    Ma, Xiaosong
    [J]. 2013 22ND INTERNATIONAL CONFERENCE ON PARALLEL ARCHITECTURES AND COMPILATION TECHNIQUES (PACT), 2013, : 269 - 278
  • [26] Gather and Conquer: Region-Based Strategies to Accelerate Safe Screening Tests
    Herzet, Cedric
    Dorffer, Clement
    Dremeau, Angelique
    [J]. IEEE TRANSACTIONS ON SIGNAL PROCESSING, 2019, 67 (12) : 3300 - 3315
  • [27] Trust Region-Based Safe Distributional Reinforcement Learning for Multiple Constraints
    Kim, Dohyeong
    Lee, Kyungjae
    Oh, Songhwai
    [J]. ADVANCES IN NEURAL INFORMATION PROCESSING SYSTEMS 36 (NEURIPS 2023), 2023,
  • [28] Extraction of texture regions using region-based local correlation
    Seo, SY
    Lim, CW
    Chun, YD
    Kim, NC
    [J]. VISUAL COMMUNICATIONS AND IMAGE PROCESSING 2001, 2001, 4310 : 694 - 701
  • [29] Adaptive region-based location management for PCS systems
    Lo, SC
    Chen, ALP
    [J]. IEEE TRANSACTIONS ON VEHICULAR TECHNOLOGY, 2002, 51 (04) : 667 - 676
  • [30] Region-based enhancement and analysis of SAR images
    Fjortoft, R
    Marthon, P
    Lopes, A
    Sery, F
    DucrotGambart, D
    CuberoCastan, E
    [J]. INTERNATIONAL CONFERENCE ON IMAGE PROCESSING, PROCEEDINGS - VOL III, 1996, : 879 - 882