You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Mikhail Fursov (JIRA)" <ji...@apache.org> on 2007/08/10 17:23:42 UTC

[jira] Assigned: (HARMONY-2095) [drlvm][jit] Jitrino/OPT does not throw IncompatibaleClassChangeError when objectref in invokeinterface instruction refers to the class which does not implement used interface

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

Mikhail Fursov reassigned HARMONY-2095:
---------------------------------------

    Assignee: Mikhail Fursov

> [drlvm][jit] Jitrino/OPT does not throw IncompatibaleClassChangeError when objectref in invokeinterface instruction refers to the class which does  not implement used interface
> --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HARMONY-2095
>                 URL: https://issues.apache.org/jira/browse/HARMONY-2095
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows and Linux
>            Reporter: Vera Petrashkova
>            Assignee: Mikhail Fursov
>         Attachments: intfTest.zip
>
>
> If  objectref in invokeinterface instruction refers to the class which does  not implement used interface Jitrino/OPT does not throw IncompatibaleClassChangeError.
> To reproduce this bug run the following intfTest. It invokes class intf_cl_2 which was created from jasmin code:
> ------------------intfTest.java------------------
> import java.io.*;
> public class intfTest {
>     public static void main (String[] args) {
>         try {
>              System.out.println("Test failed: " + new intf_cl_2().test());
>         } catch (IncompatibleClassChangeError e) {
>              System.out.println("Test passed: " + e);
>              e.printStackTrace();
>         } catch (Throwable e) {
>              System.out.println("Test failed: unexpected error");
>              e.printStackTrace();
>         }
>     }
> }
> -----------------------------------------------
> public interface intf_1 {
>     public abstract int intfMethod();
> }
> -----------------------------------------------
> public interface intf_2 {
>     public abstract int intfMethod();
> }
> ----------------------------------------------
> public class intf_cl_1 implements intf_1 {
>     public int intfMethod() {
>         return 105;
>     }
> }
> ---------------------------------------------
> .class public intf_cl_2
> .super java/lang/Object
> ;
> ; standard initializer
> .method public <init>()V
>    aload_0
>    invokespecial java/lang/Object/<init>()V
>    return
> .end method 
> ;
> ; test method
> .method public test()I
>   .limit locals 2
>   .limit stack 2
>   new intf_cl_1
>   dup
>   invokespecial intf_cl_1/<init>()V
>   invokeinterface intf_2/intfMethod()I 1
>   bipush 105
>   ireturn
> .end method
> ---------------------------------------------------
> Create intf_cl_2 class using jasmin.jar 
>     java -cp jasmin.jar intf_cl_2.jj
> or use class file from attachment
> And run test:
> java -cp . -Xem:opt intfTest
> Output on Harmony (JitrinioJET and Interpreter)
> =====================================
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its l
> icensors, as applicable.
> java version "1.5.0"
> pre-alpha : not complete or compatible
> svn = r471468, (Nov  7 2006), Windows/ia32/msvc 1310, release build
> http://incubator.apache.org/harmony
> Test passed: java.lang.IncompatibleClassChangeError: intf_2
> java.lang.IncompatibleClassChangeError: intf_2
>         at intf_cl_2.test(intf_cl_2.jj)
>         at intfTest.main(intfTest.java:7)
> Output on Harmony (Jitrino/OPT)
> =============================
> Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foundation or its licensors, as applicable.
> java version "1.5.0" 
> pre-alpha : not complete or compatible
> svn = r471468, (Nov  7 2006), Linux/ia32/icc 900, release build
> http://incubator.apache.org/harmony
> Test failed: 105

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