8027146: Class loading verification failure if GC occurs in Universe::flush_dependents_on

Remove search in system dictionary and hacks, replace with verifying in CLD::_klasses list.

Reviewed-by: dcubed, acorn
This commit is contained in:
Coleen Phillimore 2014-02-15 13:03:38 -05:00
parent c9b3cbbdcc
commit 4ab0b2732c
13 changed files with 36 additions and 52 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -3180,7 +3180,7 @@ class VerifyFieldClosure: public OopClosure {
virtual void do_oop(narrowOop* p) { VerifyFieldClosure::do_oop_work(p); }
};
void InstanceKlass::verify_on(outputStream* st, bool check_dictionary) {
void InstanceKlass::verify_on(outputStream* st) {
#ifndef PRODUCT
// Avoid redundant verifies, this really should be in product.
if (_verify_count == Universe::verify_count()) return;
@ -3188,14 +3188,11 @@ void InstanceKlass::verify_on(outputStream* st, bool check_dictionary) {
#endif
// Verify Klass
Klass::verify_on(st, check_dictionary);
Klass::verify_on(st);
// Verify that klass is present in SystemDictionary if not already
// verifying the SystemDictionary.
if (is_loaded() && !is_anonymous() && check_dictionary) {
Symbol* h_name = name();
SystemDictionary::verify_obj_klass_present(h_name, class_loader_data());
}
// Verify that klass is present in ClassLoaderData
guarantee(class_loader_data()->contains_klass(this),
"this class isn't found in class loader data");
// Verify vtables
if (is_linked()) {