RFR(XS) 8130669: VM prohibits <clinit> methods with return values
Karen Kinnear
karen.kinnear at oracle.com
Wed Jul 8 16:41:51 UTC 2015
Harold,
I like your code changes and your tests.
One small comment:
1. verifier.cpp around line 2849 - could you possibly fix the comment - it says
"Class file parser verifies that methods with '<' have void return"
-- we only check <init> now which is what that logic cares about
thanks,
Karen
On Jul 8, 2015, at 9:32 AM, harold seigel wrote:
> Hi,
>
> Please review this small change to fix bug JDK-8130669. The JVM incorrectly throws ClassFormatError exceptions for non-void methods named <clinit>. But, the JVM Spec 8 says that such <clinit> methods should be ignored. See http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-2.html#jvms-2.9 for details.
>
> The fix changes the JVM to, in this case, only throw ClassFormatError exceptions for non-void <init> methods.
>
> Open Webrev: http://cr.openjdk.java.net/~hseigel/bug_8130669/
>
> JBS Bug: https://bugs.openjdk.java.net/browse/JDK-8130669
>
> The fix was tested with JCK Lang and VM tests, the UTE quick and split_verifier tests, and the hotspot, java/io, java/lang, and java/util JTreg tests.
>
> Thanks, Harold
More information about the hotspot-runtime-dev
mailing list