This commit is contained in:
Alejandro Murillo 2014-10-17 07:58:54 -07:00
commit c3b487d84f
100 changed files with 1761 additions and 2103 deletions

View file

@ -98,6 +98,19 @@ bool Verifier::verify(instanceKlassHandle klass, Verifier::Mode mode, bool shoul
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;
}