Quarantine: Java Heap Protection in the Presence of Native Code

Date Added: Dec 2009
Format: PDF

By using Java Native Interface (JNI), programmers can integrate Java programs with legacy systems or third-party libraries written in other languages (e.g., C, C++, and Pascal). However, the use of JNI may violate Java type safety feature because these native programs are not type-safe. As a result, such integration can cause memory errors that can be difficult to isolate. In this paper, the authors propose Quarantine, a runtime system that preserves memory safety of Java objects in spite of integration with native code. The goal of Quarantine is ensuring that no native threads can directly access objects in the Java heap. They provide a formal proof that the technique can achieve this goal.