Return-Path: Delivered-To: apmail-harmony-commits-archive@www.apache.org Received: (qmail 59907 invoked from network); 8 Dec 2006 16:09:49 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 8 Dec 2006 16:09:49 -0000 Received: (qmail 6084 invoked by uid 500); 8 Dec 2006 16:09:57 -0000 Delivered-To: apmail-harmony-commits-archive@harmony.apache.org Received: (qmail 6041 invoked by uid 500); 8 Dec 2006 16:09:56 -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 5969 invoked by uid 99); 8 Dec 2006 16:09:56 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 08 Dec 2006 08:09:56 -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; Fri, 08 Dec 2006 08:09:48 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id AB81F71431B for ; Fri, 8 Dec 2006 08:09:27 -0800 (PST) Message-ID: <18097507.1165594167697.JavaMail.jira@brutus> Date: Fri, 8 Dec 2006 08:09:27 -0800 (PST) From: "Vladimir Beliaev (JIRA)" To: commits@harmony.apache.org Subject: [jira] Created: (HARMONY-2558) [drlvm][jit] 'new' bytecode does not cause class initialization MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org [drlvm][jit] 'new' bytecode does not cause class initialization --------------------------------------------------------------- Key: HARMONY-2558 URL: http://issues.apache.org/jira/browse/HARMONY-2558 Project: Harmony Issue Type: Bug Components: DRLVM Reporter: Vladimir Beliaev According to JVMS for 'new' bytecode: http://java.sun.com/docs/books/vmspec/2nd-edition/html/Instructions2.doc10.= html#new ... named class, array, or interface type is resolved (=C2=A75.4.3.1) ... ... On successful resolution of the class, it is initialized (=C2=A75.5) i= f it has not already been initialized.... See also 5.5 Initialization (http://java.sun.com/docs/books/vmspec/2nd-edit= ion/html/ConstantPool.doc.html#77976). ... A class or interface may be initialized only as a result of: o The execution of any one of the Java virtual machine instructions = new, getstatic,... So, executing 'new' bytecode must cause a class initialization (in particla= r call). The attached test shows it is not true for recent version= of DRLVM. In this test the produce exception which is supposed to= be catched in 'main' method. The issue is not reproducible with interpreter (-Xint) - marking this bug a= s JIT one. To prepare the test please build attached Jasm_part.jj first; then build Te= st.java. Test output is: $ deploy/jre/bin/java -showversion Test Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foun= dation or its licensors, as applicable. java version "1.5.0"=20 pre-alpha : not complete or compatible svn =3D r482108, (Dec 8 2006), Windows/ia32/msvc 1310, debug build http://incubator.apache.org/harmony FAILED: no exception... $ deploy/jre/bin/java -showversion -Xint Test Apache Harmony Launcher : (c) Copyright 1991, 2006 The Apache Software Foun= dation or its licensors, as applicable. java version "1.5.0"=20 pre-alpha : not complete or compatible svn =3D r482108, (Dec 8 2006), Windows/ia32/msvc 1310, debug build http://incubator.apache.org/harmony PASSED... $ java -showversion Test java version "1.5.0" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64) BEA WebLogic JRockit(R) (build dra-38972-20041208-2001-win-ia32, R25.0.0-75= , GC: System optimized over throughput (initial strategy singleparpar)) PASSED... Thanks Vladimir --=20 This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: htt= p://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira