paperbot · PL 论文追踪

全部论文 待读 收藏

P2 The Downgrading Semantics of Memory Safety

内存安全的降级语义
PLDI 10(PLDI)2026匹配度 3/10 · 论文属于程序语言形式语义与内存安全/信息流非干扰方向,与静态分析和形式化验证有间接关联,但未涉及用户核心关注的 PL↔AI 交叉、LLM/Agent、浮点程序分析或贝叶斯程序分析,也无工业落地或 benchmark 驱动。引用 0 inbox
René Rydhof Hansen, Andreas Stenbæk Larsen, Aslan Askarov
crossref: 2026-09-10

AI 速览

一句话:提出渐进分配器独立性,用信息流非干扰与降级语义刻画分配器相关的内存安全。

传统内存安全通常以“不会发生哪些坏事”的负面性质来定义,形式化文献多沿用此视角,但缺少能蕴含这些性质的通用语义原则。本文聚焦分配器相关方面,包括空指针解引用、释放后使用、双重释放和堆溢出,提出“渐进分配器独立性”概念。其直觉来自非干扰,即分配器不应影响程序执行;并针对分配器内存耗尽和指针到整数转换两类情形精化定义,把它们视为 downgrading,借助信息流机制处理。作者在含 malloc/free、平坦内存且指针即整数的低级语言中形式化该语义,从而更准确地刻画依赖分配器的内存安全。

问题
传统内存安全以负面性质描述,缺少能蕴含这些性质的通用语义原则;本文关注分配器相关的内存安全,如空指针解引用、释放后使用、双重释放和堆溢出。
方法
提出渐进分配器独立性,受非干扰启发,并将分配器内存耗尽与指针到整数转换视为 downgrading,用信息流机制在含 malloc/free、平坦内存且指针即整数的低级语言中形式化处理。
评估
以形式化语义定义与概念分析为主;摘要未报告实现或实证评估,评估体现为对 OOM 和指针到整数转换这两类降级情形的技术处理。
原文摘要(Abstract)

Memory safety is traditionally characterized in terms of bad things that cannot happen. This approach is currently embraced in the literature on formal methods for memory safety. However, a general semantic principle for memory safety, that implies the negative items, remains elusive. This paper focuses on the allocator-specific aspects of memory safety, such as null-pointer dereference, use after free, double free, and heap overflow. To that extent, we propose a notion of gradual allocator independence that accurately captures the allocator-dependent aspects of memory safety. Our approach is inspired by the previously suggested connection between memory safety and noninterference, but extends that connection in a fundamentally important direction towards downgrading. We consider a low-level language with access to an allocator that provides malloc and free primitives in a flat memory model. Pointers are just integers, and as such it is trivial to write memory-unsafe programs. The basic intuition of gradual allocator independence is that of noninterference, namely that allocators must not influence program execution. This intuition is refined in two important ways that account for the allocators running out-of-memory and for programs to have pointer-to-integer casts. The key insight of the definition is to treat these extensions as forms of downgrading and give them satisfactory technical treatment using the state-of-the-art information flow machinery.

链接与引用

DOI 原文 · arXiv · PDF(开放获取) · DBLP

BibTeX
@article{HansenLA26,
  title = {The Downgrading Semantics of Memory Safety},
  author = {René Rydhof Hansen and Andreas Stenbæk Larsen and Aslan Askarov},
  journal = {Proceedings of the ACM on Programming Languages},
  volume = {10},
  number = {PLDI},
  year = {2026},
  doi = {10.1145/3808260}
}