paperbot · PL 论文追踪

全部论文 待读 收藏

P2 What You Trace is What You Get: Dynamic Stack-Layout Recovery for Binary Recompilation

你追踪什么就得到什么:面向二进制重编译的动态栈布局恢复
ASPLOS Proceedings of the 29th ACM International Conference on Architectural Support for Programming Languages and Operating Systems, Volume 22024匹配度 2/10 · 论文属于程序分析与编译领域,但聚焦二进制重编译中的动态栈布局恢复,与用户关注的静态分析、LLM/Agent 与程序分析的交叉、浮点程序分析或贝叶斯程序分析等具体方向均无直接关联。引用 6 inbox
Fabian Parzefall, Chinmay Deshpande, Felicitas Hetzelt, Michael Franz
crossref: 2026-09-12dblp: 2026-09-12

AI 速览

一句话:提出 WYTIWYG,用插桩动态分析精确恢复提升二进制中的局部变量,重编译后性能提升 1.18–1.22 倍。

无源码的专有或遗留程序无法受益于现代编译器技术,二进制重编译器通过将可执行文件提升到编译器 IR 再下降回可执行形式来弥合这一差距。然而已有方法无法足够精确地恢复提升后程序中的函数局部变量,只能依赖在部分程序上失效的启发式或导致结果不精确的保守过近似,这阻碍了性能优化等编译器应用。本文提出 WYTIWYG,将局部变量恢复分解为一系列基于插桩的动态二进制分析,全自动进行并保持用户输入下的功能正确性。作者在 SPECint 2006 上进行广泛评估,与两个先前发表的先进二进制重编译器直接比较,处理由最新编译器编译的完全优化商业二进制。以重编译二进制的性能作为 IR 质量的指标,该方法平均显著优于同类重编译器 1.18 倍;对于旧编译器优化的遗留二进制,更是加速达 1.22 倍。

问题
二进制重编译器在将可执行文件提升到编译器 IR 时,难以精确恢复函数局部变量,现有启发式或保守过近似方法导致 IR 质量不足,无法支撑性能优化等编译器应用。
方法
将局部变量恢复分解为一系列基于插桩的动态二进制分析,全自动地恢复函数局部变量,并保证对用户提供的输入保持程序功能不变。
评估
在 SPECint 2006 基准上评估,并与两个先前发表的先进二进制重编译器直接比较;处理最新编译器编译的完全优化商业二进制,以重编译后性能作为 IR 质量指标。
原文摘要(Abstract)

Users of proprietary and/or legacy programs without vendor support are denied the significant advances in compiler technologies of the past decades. Adapting these technologies to operate directly on binaries without source code is often infeasible. Binary recompilers attempt to bridge this gap by "lifting" binary executables to compiler-level intermediate representations (IR) and "lowering" them back down to executable form, enabling application of the full range of analyses and transformations available in modern compiler infrastructures. Past approaches could not recover local variables in lifted programs with sufficient precision, which is a necessary prerequisite for many compiler-related applications, including performance optimization. They have relied on heuristics failing on certain input programs, or on conservative over-approximations yielding imprecise results. In this paper, we present a novel approach, WYTIWYG, to recover function-local variables within lifted binaries. Our approach is fully automated and preserves functionality for user-provided inputs. This is accomplished by decomposing the recovery of local variables into a series of instrumentation-based dynamic binary analyses. We conduct an extensive set of careful evaluations on the SPECint 2006 benchmark suite, including direct comparisons with two previously published state-of-the-art binary recompilers. Our approach recompiles fully optimized commercial off-the-shelf binaries compiled with the latest compilers. Using performance of recompiled binaries as an indicator of IR-quality, our approach significantly outperforms similar recompilers by 1.18x on average. Furthermore, WYTIWYG accelerates legacy binaries optimized by older compilers by an astounding 1.22x.

链接与引用

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

BibTeX
@inproceedings{ParzefallDHF24,
  title = {What You Trace is What You Get: Dynamic Stack-Layout Recovery for Binary Recompilation},
  author = {Fabian Parzefall and Chinmay Deshpande and Felicitas Hetzelt and Michael Franz},
  booktitle = {ASPLOS},
  year = {2024},
  doi = {10.1145/3620665.3640371}
}