mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-18 10:04:42 +02:00
8267347: CDS record_linking_constraint asserts with unregistered class
Reviewed-by: minqi, ccheung
This commit is contained in:
parent
a5467ae7bb
commit
209769b5ad
5 changed files with 156 additions and 22 deletions
|
@ -1855,8 +1855,6 @@ void SystemDictionaryShared::record_linking_constraint(Symbol* name, InstanceKla
|
|||
// either of these two loaders. The check itself does not
|
||||
// try to resolve T.
|
||||
oop klass_loader = klass->class_loader();
|
||||
assert(klass_loader != NULL, "should not be called for boot loader");
|
||||
assert(loader1 != loader2, "must be");
|
||||
|
||||
if (!is_system_class_loader(klass_loader) &&
|
||||
!is_platform_class_loader(klass_loader)) {
|
||||
|
@ -1872,6 +1870,17 @@ void SystemDictionaryShared::record_linking_constraint(Symbol* name, InstanceKla
|
|||
return;
|
||||
}
|
||||
|
||||
if (DumpSharedSpaces && !is_builtin(klass)) {
|
||||
// During static dump, unregistered classes (those intended for
|
||||
// custom loaders) are loaded by the boot loader. Need to
|
||||
// exclude these for the same reason as above.
|
||||
// This should be fixed by JDK-8261941.
|
||||
return;
|
||||
}
|
||||
|
||||
assert(klass_loader != NULL, "should not be called for boot loader");
|
||||
assert(loader1 != loader2, "must be");
|
||||
|
||||
if (DynamicDumpSharedSpaces && Thread::current()->is_VM_thread()) {
|
||||
// We are re-laying out the vtable/itables of the *copy* of
|
||||
// a class during the final stage of dynamic dumping. The
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue