RFR (xs) 8166203 NoClassDefFoundError should not be thrown if class is in_error_state

Ioi Lam ioi.lam at oracle.com
Wed Oct 12 04:47:48 UTC 2016


https://bugs.openjdk.java.net/browse/JDK-8166203
http://cr.openjdk.java.net/~iklam/jdk9/8166203_init_state_error_bug/

Summary:

Kudos to Coleen for noticing the bug.

When dumping the CDS archive, we would throw NoClassDefFoundError inside 
InstanceKlass::link_class_impl() if the current class is in_error_state. 
This was only intended to be a convenient way to deal with verification 
errors during CDS dumping time. However, if the code is executed in 
normal VM execution time, it would violate the JLS.

The fix is to throw the NoClassDefFoundError only when 
DumpSharedSpaces==true, to avoid affecting normal VM execution.

Thanks
- Ioi



More information about the hotspot-runtime-dev mailing list