Online Verification of Offline Escape Analysis Michael Franz +* Vivek Haldar + Chandra Krintz ! Christian Stork + + Dept. of Information and Computer Science ! Dept. of Computer Science Univ. of California, Irvine Univ. of California, Santa Barbara Abstract Dynamic compilation often comes at the price of reduced code quality since there is not enough time available to perform expensive optimizations. One solution to this problem has been the addition of annotations by the code producer that enable an annotation-aware dynamic code generator on the code consumer’s side to shortcut certain analysis and optimization steps. However, code annotation often creates a new problem in that most annotations are unsafe—if they become corrupted during transit, the safety of the target system is jeopardized. In this paper, we consider annotations that transport escape-analysis information for Java programs. This information can be highly beneficial, not only for enabling stack allocation instead of costly heap allocation, but also for reducing synchronization overhead. The traditional solution of annotating allocation sites, however, is unsafe and cannot be verified without repeating the complete analysis. Our solution consists of annotating variables rather than allocation sites, parti- tioning them into two classes. This annotation can be verified in linear time. It is a conservative annotation and less precise than annotating allocation sites, i.e., some * Authors in alphabetical order. 1