harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gregory Shimansky (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HARMONY-2808) [drlvm] VM crashes instead of throwing VerifyError when used class overrides final method
Date Tue, 30 Jan 2007 12:56:33 GMT

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

Gregory Shimansky resolved HARMONY-2808.
----------------------------------------

    Resolution: Fixed

Patch and regression test applied at 501393. Please check that the patch was applied as expected.

> [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
>         Assigned To: Gregory Shimansky
>         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.


Mime
View raw message