Merge
authordcubed
Fri, 10 Oct 2014 18:00:14 +0000
changeset 27161 cd50a16cf47e
parent 27159 3d2543e475e4 (diff)
parent 27160 b60dff56e547 (current diff)
child 27163 66521b7ba8d6
Merge
jdk/make/SignJars.gmk
jdk/src/java.base/share/classes/javax/crypto/JarVerifier.java
jdk/src/jdk.dev/share/classes/com/sun/jarsigner/package.html
jdk/test/sun/management/jdp/JdpClient.java
jdk/test/sun/management/jdp/JdpDoSomething.java
jdk/test/sun/management/jdp/JdpTest.sh
jdk/test/sun/management/jdp/JdpUnitTest.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/AttrWithDeps.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/JavaCompilerWithDeps.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/ResolveWithDeps.java
langtools/src/jdk.compiler/share/classes/com/sun/tools/sjavac/comp/SjavacErrorHandler.java
langtools/test/tools/javac/UncaughtOverflow2.java
--- a/hotspot/src/share/vm/classfile/verifier.cpp	Fri Oct 10 08:28:12 2014 -0700
+++ b/hotspot/src/share/vm/classfile/verifier.cpp	Fri Oct 10 18:00:14 2014 +0000
@@ -98,6 +98,19 @@
   HandleMark hm;
   ResourceMark rm(THREAD);
 
+  // Eagerly allocate the identity hash code for a klass. This is a fallout
+  // from 6320749 and 8059924: hash code generator is not supposed to be called
+  // during the safepoint, but it allows to sneak the hashcode in during
+  // verification. Without this eager hashcode generation, we may end up
+  // installing the hashcode during some other operation, which may be at
+  // safepoint -- blowing up the checks. It was previously done as the side
+  // effect (sic!) for external_name(), but instead of doing that, we opt to
+  // explicitly push the hashcode in here. This is signify the following block
+  // is IMPORTANT:
+  if (klass->java_mirror() != NULL) {
+    klass->java_mirror()->identity_hash();
+  }
+
   if (!is_eligible_for_verification(klass, should_verify_class)) {
     return true;
   }