paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Identifying Java calls in native code via binary scanning

通过二进制扫描识别原生代码中的 Java 调用
ISSTA Proceedings of the 29th ACM SIGSOFT International Symposium on Software Testing and Analysis2020匹配度 3/10 · 这是一篇扎实的传统静态分析论文(反汇编 native 二进制、恢复 JNI 符号以健全地建模 Java 回调),但研究目标既非 PL→AI/AI→PL 交叉,也非浮点程序分析或贝叶斯程序分析,与用户画像核心方向基本不重合;仅因涉及静态分析健全性与工业落地(Chrome/Instagram)而略有交集。引用 25 inbox
George Fourtounis, Leonidas Triantafyllou, Yannis Smaragdakis
crossref: 2026-09-12

AI 速览

一句话:反汇编 native 二进制并恢复 JNI 符号,静态建模 native 回调,使 Java 静态分析能健全地捕捉 native 代码中的 Java 调用。

现有 Java 静态分析器在源代码或字节码层面运行时,对包含 native 代码的程序存在不健全性。本文指出 JNI 规范足够规整,允许对 native 代码在回调方面对程序执行的影响进行静态推理。方法包括:反汇编 native 二进制,恢复与 Java 方法签名对应的静态符号信息,并生成模型,借助 mock 对象静态执行这些 native 回调。评估表明,该方法能恢复 native 代码中几乎所有 Java 调用:在大型 Android 应用(Chrome、Instagram)上达到 100% 的 native 到应用调用图召回率,并完整捕获 XCorpus 套件程序的 native 回调行为。

问题
Java 静态分析器因 native 代码而失去健全性,难以发现 native 代码对 Java 方法的回调,导致调用图不完整。
方法
反汇编 native 二进制,恢复 JNI 相关符号信息,构建静态模型并用 mock 对象模拟执行 native 回调,从而识别其中的 Java 调用。
评估
在 Android 与 Java 桌面应用上评估,对 Chrome、Instagram 等大型 Android 应用取得 100% native 到应用调用图召回率,并完整捕获 XCorpus 套件的 native 回调行为。
原文摘要(Abstract)

Current Java static analyzers, operating either on the source or bytecode level, exhibit unsoundness for programs that contain native code. We show that the Java Native Interface (JNI) specification, which is used by Java programs to interoperate with Java code, is principled enough to permit static reasoning about the effects of native code on program execution when it comes to call-backs. Our approach consists of disassembling native binaries, recovering static symbol information that corresponds to Java method signatures, and producing a model for statically exercising these native call-backs with appropriate mock objects. The approach manages to recover virtually all Java calls in native code, for both Android and Java desktop applications—(a) achieving 100% native-to-application call-graph recall on large Android applications (Chrome, Instagram) and (b) capturing the full native call-back behavior of the XCorpus suite programs.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot6061,
  title = {Identifying Java calls in native code via binary scanning},
  author = {George Fourtounis and Leonidas Triantafyllou and Yannis Smaragdakis},
  booktitle = {ISSTA},
  year = {2020},
  doi = {10.1145/3395363.3397368}
}