[Jamvm-general] Implement JVM_FindClassFromCaller OpenJDK: 8015256: Better class accessibility
Brought to you by:
rlougher
From: Xerxes R. <xe...@gu...> - 2014-10-26 20:05:54
|
The latest OpenJDK secuity update broke all alternative JVM support by introducing a new symbol JVM_FindClassFromCaller java -jamvm -version java: relocation error: /usr/lib/jvm/java-7-openjdk-amd64/jre/lib/amd64/libjava.so: symbol JVM_FindClassFromCaller, version SUNWprivate_1.1 not defined in file libjvm.so with link time reference The OpenJDK source tree revealed the following information: 8015256: Better class accessibility Summary: Improve protection domain check in forName() http://hg.openjdk.java.net/jdk7u/jdk7u/hotspot/rev/61d1e75e0a58 http://hg.openjdk.java.net/jdk7u/jdk7u/jdk/rev/16cd2826a58f JVM_FindClassFromCaller appears to work quite similar to JVM_FindClassFromClassLoader with the twist that the protection domain that belongs to the caller class argument shall be used during the lookup of the class. The attached patch implements JVM_FindClassFromCaller for JamVM with this obvious TODO: /* XXX The caller's protection domain should be used during the findClassFromClassLoader but there is no specification or unit-test in OpenJDK documenting the desired effect */ java -jamvm -version java version "1.7.0_65" OpenJDK Runtime Environment (IcedTea 2.5.3) (7u71-2.5.3-0ubuntu0.14.04.1) JamVM (build 2.0.1-devel, inline-threaded interpreter) Cheers Xerxes |