From commits-return-37881-apmail-harmony-commits-archive=harmony.apache.org@harmony.apache.org Thu Jun 14 12:24:49 2007 Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 83174 invoked from network); 14 Jun 2007 12:24:48 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 14 Jun 2007 12:24:48 -0000 Received: (qmail 84734 invoked by uid 500); 14 Jun 2007 12:24:52 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 84572 invoked by uid 500); 14 Jun 2007 12:24:51 -0000 Mailing-List: contact commits-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list commits@harmony.apache.org Received: (qmail 84555 invoked by uid 99); 14 Jun 2007 12:24:51 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 14 Jun 2007 05:24:51 -0700 X-ASF-Spam-Status: No, hits=-100.0 required=10.0 tests=ALL_TRUSTED 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; Thu, 14 Jun 2007 05:24:47 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 4319B714168 for ; Thu, 14 Jun 2007 05:24:27 -0700 (PDT) Message-ID: <29642220.1181823867272.JavaMail.jira@brutus> Date: Thu, 14 Jun 2007 05:24:27 -0700 (PDT) From: "Alexei Fedotov (JIRA)" To: commits@harmony.apache.org Subject: [jira] Updated: (HARMONY-4053) [drlvm][verifier] Unexpected VerifyError is thrown if end_pc from exception table of code attribute is equal to the length of the code array In-Reply-To: <6540182.1181109506114.JavaMail.jira@brutus> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/HARMONY-4053?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ] Alexei Fedotov updated HARMONY-4053: ------------------------------------ Attachment: test.patch Here is a regression test for the issue. > [drlvm][verifier] Unexpected VerifyError is thrown if end_pc from exception table of code attribute is equal to the length of the code array > -------------------------------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-4053 > URL: https://issues.apache.org/jira/browse/HARMONY-4053 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Reporter: Elena Sayapina > Attachments: reproduce.zip, test.patch > > > Unexpected VerifyError is thrown if end_pc from exception table of code attribute is equal to the length of the code array > This issue caused the failures of 11 test cases from Geronimo unit test suite. > Affected tests: > org.apache.geronimo.gjndi.JavaCompContextTest > org.apache.geronimo.gjndi.JavaCompGBeanTest > org.apache.geronimo.gjndi.KernelContextGBeanTest > According J2SE VM specification: > "4.7.3 The Code Attribute > ... > Each exception_table entry contains the following four items: > start_pc, end_pc > The values of the two items start_pc and end_pc indicate the ranges in the code array at which the exception handler is active. The value of start_pc must be a valid index into the code array of the opcode of an instruction. The value of end_pc either must be a valid index into the code array of the opcode of an instruction or must be equal to code_length, the length of the code array ... " > But DRLVM throws VerifyError if ending point in exception table is equal to the length of the code array. > Please, use the code below for reproducing: > ------------------------------------- Verify.java -------------------------------------- > public class Verify { > public static void main(String[] args) throws ClassNotFoundException { > try { > Class cl = Class.forName("test"); > System.out.println("TEST PASSED"); > } catch (Throwable e) { > System.out.println("TEST FAILED: unexpected " + e); > } > } > } > ------------------------------------- test.ccode-------------------------------------- > magic = xCAFEBABE > minor_version = 3 > major_version = 45 > constant_pool_count = 13 > constant_pool { > /* #1 */ Method = #12 #6 > /* #2 */ UTF8 = "java/lang/Object" > /* #3 */ UTF8 = "SourceFile" > /* #4 */ UTF8 = "" > /* #5 */ Class = #11 > /* #6 */ NameAndType = #4 #10 > /* #7 */ UTF8 = "Code" > /* #8 */ UTF8 = "test.ccode" > /* #9 */ UTF8 = "test" > /* #10 */ UTF8 = "()V" > /* #11 */ UTF8 = "test" > /* #12 */ Class = #2 > } > access_flags = PUBLIC SUPER // x21 > this_class = #5 // "test" > super_class = #12 // "java/lang/Object" > interfaces_count = 0 > interfaces { > } > fields_count = 0 > methods_count = 2 > methods { > method { > access_flag = PUBLIC // x01 > name_index = #4 // "" > descriptor_index = #10 // "()V" > attributes_count = 1 > attributes { > attribute Code { > attribute_name_index = #7 // "Code" > attribute_length = 17 > max_stack = 1 > max_locals = 1 > code_length = 5 > code asm { > 0: aload_0 > 1: invokespecial #1 > 4: return > } > exception_table_length = 0 > attributes_count = 0 > } > } > } > // Test method > method { > access_flag = PUBLIC // x01 > name_index = #9 // "test" > descriptor_index = #10 // "()V" > attributes_count = 1 > attributes { > attribute Code { > attribute_name_index = #7 // "Code" > attribute_length = 35 > max_stack = 2 > max_locals = 2 > code_length = 15 > code asm { > 0: sipush 1 > 3: pop > 4: return > 5: sipush 2 > 8: pop > 9: return > 10: sipush 3 > 13: pop > 14: return > } > exception_table_length = 1 > exception_table { > // start_pc end_pc handler_pc catch_type > 0 15 10 0 // end_pc is equal to code_length > } > attributes_count = 0 > } > } > } > } > attributes_count = 1 > attributes { > attribute SourceFile { > attribute_name_index = #3 // "SourceFile" > attribute_length = 2 > sourcefile_index = #8 // "test.ccode" > } > } > ----------------------------------------------------------------------------------------------- > test class file can be created using VMTT tool from http://issues.apache.org/jira/browse/HARMONY-3206 > reproduce.zip contains test and Verify class files. > Output on Harmony-r544727: > 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 = r544727, (Jun 6 2007), Windows/ia32/msvc 1310, release build > http://harmony.apache.org > TEST FAILED: unexpected java.lang.VerifyError: (class: test, method: test()V) At least one of except > ion handler parameters [0, 15, 10] are out of instruction set > Output on RI: > java version "1.5.0_11" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) > Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode) > TEST PASSED -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.