RFR 8238175: CTW: Class.getDeclaredMethods fails with assert(k->is_subclass_of(SystemDictionary::Throwable_klass())) failed: invalid exception class

Harold Seigel harold.seigel at oracle.com
Wed Feb 12 21:17:03 UTC 2020


Hi,

Please review this change to fix bug 8238175.  The fix removes the 
assert that ensures, in resolved_checked_excpetions_impl(), that checked 
exceptions are subtypes of java.lang.Throwable.  It removes the assert 
because the JVM Spec says in section 4.7.5 
<https://docs.oracle.com/javase/specs/jvms/se13/html/jvms-4.html#jvms-4.7.5> 
that such checks should only be done at compile time.

The fix replaces the assert with logging to provide a mechanism for 
users to detect, in resolved_checked_exceptions_impl(), when checked 
exceptions are not subtypes of java.lang.Throwable.

Open Webrev: 
http://cr.openjdk.java.net/~hseigel/bug_8238175/webrev/index.html

JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8238175

The fix was regression tested by running Mach5 tiers 1 and 2 tests and 
builds on Linux-x64, Solaris, Windows, and Mac OS X, by running Mach5 
tiers 3-5 tests on Linux-x64, and JCK lang and VM tests on Linux-x64.

Thanks, Harold



More information about the hotspot-runtime-dev mailing list