You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Pavel Rebriy (JIRA)" <ji...@apache.org> on 2007/01/30 12:09:33 UTC

[jira] Updated: (HARMONY-2808) [drlvm] VM crashes instead of throwing VerifyError when used class overrides final method

     [ https://issues.apache.org/jira/browse/HARMONY-2808?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Pavel Rebriy updated HARMONY-2808:
----------------------------------

    Attachment: classloader_override_final_method_fix.patch

Fix the problem in classloader.

> [drlvm] VM crashes instead of throwing VerifyError when used class overrides final method
> -----------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2808
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2808
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows and Linux
>            Reporter: Vera Petrashkova
>         Attachments: classloader_override_final_method_fix.patch, finTest.zip
>
>
> VM crashes when it tries to load class which contains overridden final method.
> The following test which uses attached synthetic classes demonstrates this issue:
>  ----------finTest.java----------
> public class finTest {
>     public static void main(String args[]) {
>         try {
>             new finTest1().test();
>             System.out.println("Test failed. VerifyError was not thrown");
>         } catch (VerifyError e) {
>             System.out.println("Test passed: "+e);
>         } catch (Throwable e) {
>             System.out.println("Test failed: unexpected "+e);
>  	    e.printStackTrace();
> 	}
>     }
> }
> ----------------finTest1.jj--------------
> .class public finTest1
> .super java/lang/Object
> ;
> ; standard initializer
> .method public <init>()V
>    aload_0
>    invokespecial java/lang/Object/<init>()V
>    return
> .end method 
> ; final method
> .method public final testMethod()I
>   .limit locals 2
>   .limit stack 2
>   sipush 1
>   ireturn
> .end method
> ;
> .method public test()V
>   .limit stack 2
>   .limit locals 2
>   new finTest2
>   dup
>   invokespecial finTest2/<init>()V
>   aload 0
>   invokevirtual finTest2/testMethod()V
>   return
> .end method
> --------------finTest2.jj------------------
> .class public finTest2
> .super finTest1
> ;
> ; standard initializer
> .method public <init>()V
>    aload_0
>    invokespecial finTest1/<init>()V
>    return
> .end method 
> ;
> .method public final testMethod()I
>   .limit locals 2
>   .limit stack 2
>   sipush 2
>   ireturn
> .end method
> -----------------

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.