paperbot · PL 论文追踪

全部论文 待读 收藏

P2 SMOKE: Scalable Path-Sensitive Memory Leak Detection for Millions of Lines of Code

SMOKE:面向数百万行代码的可扩展路径敏感内存泄漏检测
ICSE 2019 IEEE/ACM 41st International Conference on Software Engineering (ICSE)2019匹配度 3/10 · 该论文属于通用程序静态分析与抽象解释,且强调工业规模、路径敏感和两阶段分析,与用户对静态分析工程落地的兴趣有弱关联;但它不涉及 LLM/Agent、浮点程序分析或贝叶斯程序分析等当前核心方向,因此匹配度较低。引用 88 inbox
Gang Fan, Rongxin Wu, Qingkai Shi, Xiao Xiao, Jinguo Zhou, Charles Zhang
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出两阶段路径敏感静态分析,兼顾大规模可扩展性与内存泄漏检测精度。

工业级内存泄漏检测长期受困于精度与可扩展性矛盾:精确分析难扩展,不精确分析伤精度或召回。SMOKE 用两阶段化解:第一阶段以可扩展但不精确的分析生成简洁的候选泄漏路径,基于新稀疏程序表示 use-flow graph (UFG) 将问题转为多项式时间状态分析;第二阶段用更精确分析验证候选可行性,候选少且配有专用约束求解器。实验对高达 8MLoC 的工业项目可在 40 分钟内完成检查,平均误报率 24.4%,较现有研究与工业工具快 5.2–22.8 倍;在 29 个成熟基准中发现 30 个此前未知内存泄漏,均获开发者确认,其中一个获 CVE 编号。

问题
工业级内存泄漏检测存在精度与可扩展性悖论:精确分析难以扩展,不精确分析则严重损害精度或召回。
方法
SMOKE 分两阶段:先用可扩展但不精确的分析生成候选泄漏路径,基于 use-flow graph 做多项式时间状态分析;再用更精确分析验证候选可行性,并设计专用约束求解器。
评估
在最高 8MLoC 的工业项目上 40 分钟内完成检查,平均误报率 24.4%,比 SOTA 与工业工具快 5.2–22.8 倍;在 29 个基准中发现 30 个新泄漏,均被确认,其中一个获 CVE。
原文摘要(Abstract)

Detecting memory leak at industrial scale is still not well addressed, in spite of the tremendous effort from both industry and academia in the past decades. Existing work suffers from an unresolved paradox - a highly precise analysis limits its scalability and an imprecise one seriously hurts its precision or recall. In this work, we present SMOKE, a staged approach to resolve this paradox. In the ?rst stage, instead of using a uniform precise analysis for all paths, we use a scalable but imprecise analysis to compute a succinct set of candidate memory leak paths. In the second stage, we leverage a more precise analysis to verify the feasibility of those candidates. The ?rst stage is scalable, due to the design of a new sparse program representation, the use-?ow graph (UFG), that models the problem as a polynomial-time state analysis. The second stage analysis is both precise and ef?cient, due to the smaller number of candidates and the design of a dedicated constraint solver. Experimental results show that SMOKE can ?nish checking industrial-sized projects, up to 8MLoC, in forty minutes with an average false positive rate of 24.4%. Besides, SMOKE is signi?cantly faster than the state-of-the-art research techniques as well as the industrial tools, with the speedup ranging from 5.2X to 22.8X. In the twenty-nine mature and extensively checked benchmark projects, SMOKE has discovered thirty previously unknown memory leaks which were con?rmed by developers, and one even assigned a CVE ID.

链接与引用

DOI 原文 · DBLP

BibTeX
@inproceedings{FanWS0ZZ19,
  title = {SMOKE: Scalable Path-Sensitive Memory Leak Detection for Millions of Lines of Code},
  author = {Gang Fan and Rongxin Wu and Qingkai Shi and Xiao Xiao and Jinguo Zhou and Charles Zhang},
  booktitle = {ICSE},
  year = {2019},
  doi = {10.1109/icse.2019.00025}
}