paperbot · PL 论文追踪

全部论文 待读 收藏

Finding Typing-Related Bugs in JVM Implementations

在 JVM 实现中查找与类型相关的缺陷
ASE Proceedings of the 41st IEEE/ACM International Conference on Automated Software Engineering2026引用 0 inbox
Yanzhou Lu, Junjie Chen, Yingquan Zhao, Tianchang Gao, Zan Wang
crossref: 2026-10-09

AI 速览

一句话:提出首个由 JLS 类型规范引导、利用 LLM 生成字节码测试程序来检测 JVM 类型相关缺陷的技术 Caster。

Java 依赖类型系统,但现有测试多针对 Java 编译器中的类型实现,JVM 中类型相关实现测试不足,直接 JVM 测试也常聚焦 JIT、GC 等组件。本文提出 Caster,首个由 Java 语言规范(JLS)类型规范引导、直接生成字节码测试程序来检测 JVM 类型相关缺陷的技术。Caster 用特征原语封装测试操作,借助大语言模型从 JLS 识别测试场景并指导原语组合,再通过多单元生成器的笛卡尔积扩展生成大量程序;执行时从内存动态加载,经反射在不同 JVM 上调用并比较结果列表以发现不一致。在 HotSpot、OpenJ9、Dragonwell 的四个 LTS OpenJDK 版本上,Caster 优于现有技术,并发现 21 个未知缺陷,其中 18 个已确认或修复。

问题
现有测试主要针对 Java 编译器的类型相关实现,JVM 中差异较大的类型相关实现测试不足;直接 JVM 测试多聚焦 JIT、GC 等特定组件。
方法
Caster 基于 JLS 类型规范设计特征原语,用 LLM 识别类型相关测试场景并指导原语组合,生成多单元字节码测试程序;随后动态加载、反射调用并跨不同 JVM 实现比较结果以检测不一致。
评估
在 HotSpot、OpenJ9、Dragonwell 的四个 LTS OpenJDK 版本上对比现有技术,Caster 检测到更多 JVM 不一致;共发现 21 个未知缺陷,其中 18 个被确认或修复。
原文摘要(Abstract)

As an object-oriented language, Java relies heavily on its type system. Existing testing efforts mainly target type-related implementations in the Java compiler, while the substantially different type-related implementations in the Java Virtual Machine (JVM) remain insufficiently tested. Although many techniques have been proposed for direct JVM testing, they mostly focus on specific components such as the JIT compiler or garbage collector, leaving type-related implementations underexplored. In this paper, we present Caster, the first technique for testing JVM type-related implementations by directly generating bytecode test programs guided by type specifications in the Java Language Specification (JLS). Specifically, Caster designs a set of feature primitives to encapsulate the operations needed for type-related testing, and leverages a Large Language Model (LLM) to identify type-related test scenarios from the JLS and guide primitive composition. Based on these scenarios, Caster organizes the selected primitive combinations into a multi-unit test-program generator, whose Cartesian-product expansion produces a large number of concrete test programs. To support large-scale execution, Caster dynamically loads these generated programs from memory and invokes them via reflection across different JVM implementations, collects their result lists, and compares them to identify inconsistencies and detect potential JVM bugs. Extensive experiments on four Long-Term Support OpenJDK versions of three popular JVM implementations (i.e., HotSpot, OpenJ9, and Dragonwell) demonstrate that Caster outperforms the state-of-the-art techniques in detecting more JVM inconsistencies. Moreover, Caster has uncovered a total of 21 previously unknown defects in the latest JVM releases, among which 18 have been confirmed or fixed by developers.

链接与引用

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

BibTeX
@inproceedings{paperbot12444,
  title = {Finding Typing-Related Bugs in JVM Implementations},
  author = {Yanzhou Lu and Junjie Chen and Yingquan Zhao and Tianchang Gao and Zan Wang},
  booktitle = {ASE},
  year = {2026},
  doi = {10.1145/3832783.3834396}
}