Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 79652 invoked from network); 8 Nov 2006 05:43:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Nov 2006 05:43:12 -0000 Received: (qmail 27830 invoked by uid 500); 8 Nov 2006 05:43:23 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 27803 invoked by uid 500); 8 Nov 2006 05:43:23 -0000 Mailing-List: contact harmony-commits-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: harmony-dev@incubator.apache.org Delivered-To: mailing list harmony-commits@incubator.apache.org Received: (qmail 27789 invoked by uid 99); 8 Nov 2006 05:43:23 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 21:43:23 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 07 Nov 2006 21:43:11 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 72EC77142EC for ; Tue, 7 Nov 2006 21:42:51 -0800 (PST) Message-ID: <29984561.1162964571468.JavaMail.jira@brutus> Date: Tue, 7 Nov 2006 21:42:51 -0800 (PST) From: "Vera Petrashkova (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Created: (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 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [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: http://issues.apache.org/jira/browse/HARMONY-2095 Project: Harmony Issue Type: Bug Components: DRLVM Environment: Windows and Linux Reporter: Vera Petrashkova 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 ()V aload_0 invokespecial java/lang/Object/()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/()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. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira