mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-28 15:24:43 +02:00
8054402: "klass->is_loader_alive(_is_alive)) failed: must be alive" for anonymous classes
Because anonymous classes are not in the system dictionary, we have to set 'unloading_occurred' based on 'CLDG::do_unloading()'. Added jtreg test. Reviewed-by: kvn, coleenp
This commit is contained in:
parent
8ed4cb5a02
commit
d50dfdb399
4 changed files with 136 additions and 21 deletions
|
@ -1661,10 +1661,9 @@ public:
|
|||
// Note: anonymous classes are not in the SD.
|
||||
bool SystemDictionary::do_unloading(BoolObjectClosure* is_alive) {
|
||||
// First, mark for unload all ClassLoaderData referencing a dead class loader.
|
||||
bool has_dead_loaders = ClassLoaderDataGraph::do_unloading(is_alive);
|
||||
bool unloading_occurred = false;
|
||||
if (has_dead_loaders) {
|
||||
unloading_occurred = dictionary()->do_unloading();
|
||||
bool unloading_occurred = ClassLoaderDataGraph::do_unloading(is_alive);
|
||||
if (unloading_occurred) {
|
||||
dictionary()->do_unloading();
|
||||
constraints()->purge_loader_constraints();
|
||||
resolution_errors()->purge_resolution_errors();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue