Heap protection for Java virtual machines

  • Authors:
  • Yuji Chiba

  • Affiliations:
  • Systems Development Laboratory, Ozenji, Asao, Kawasaki, Kanagawa, Japan

  • Venue:
  • PPPJ '06 Proceedings of the 4th international symposium on Principles and practice of programming in Java
  • Year:
  • 2006

Quantified Score

Hi-index 0.00

Visualization

Abstract

Java virtual machine (JVM) crashes are often due to an invalid memory reference to the JVM heap. Before the bug that caused the invalid reference can be fixed, its location must be identified. It can be in either the JVM implementation or the native library written in C language invoked from Java applications. To help system engineers identify the location, we implemented a feature using page protection that prevents threads executing native methods from referring to the JVM heap. This feature protects the JVM heap during native method execution, and when native method execution refers to the JVM heap invalidly, it interrupts the execution by generating a page-fault exception and then reports the location where the page-fault exception was generated. This helps the system engineer to identify the location of the bug in the native library. The runtime overhead for using this feature averaged 4.4% based on an estimation using the SPECjvm98, SPECjbb2000, and JFCMark benchmark suites.