Skip to main content
eScholarship
Open Access Publications from the University of California

SSA-based Java bytecode verification

Abstract

Java bytecode is commonly verified prior to execution. The standard verifier is designed as a black-box component that either accepts or rejects its input. Internally, it uses an iterative data-flow analysis to trace definitions of values to their uses to ensure type safety. The results of the data-flow analysis are discarded once that verification has completed. In many JVMs, this leads to a duplication of work, since definition-use chains will be computed all over again during just-in-time compilation. We introduce a novel bytecode verification algorithm that verifies bytecode via Static Single Assignemnt (SSA) form construction. The resulting SSA representation can immediately be used for optimization and code generation. Our prototype implementation takes less time to transform bytecode into SSA form and verify it than it takes Sun's verifier to merely confirm the validity of Java bytecode, with the added benefit that SSA is available "for free" to later compilation stages.

Main Content
For improved accessibility of PDF content, download the file to your device.
Current View