Return-Path: Delivered-To: apmail-incubator-harmony-commits-archive@www.apache.org Received: (qmail 94355 invoked from network); 14 Oct 2006 13:02:28 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 14 Oct 2006 13:02:28 -0000 Received: (qmail 12880 invoked by uid 500); 14 Oct 2006 13:02:28 -0000 Delivered-To: apmail-incubator-harmony-commits-archive@incubator.apache.org Received: (qmail 12777 invoked by uid 500); 14 Oct 2006 13:02:28 -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 12766 invoked by uid 99); 14 Oct 2006 13:02:28 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Oct 2006 06:02:28 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [209.237.227.198] (HELO brutus.apache.org) (209.237.227.198) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 14 Oct 2006 06:02:27 -0700 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 9A4FA7142F7 for ; Sat, 14 Oct 2006 06:01:41 -0700 (PDT) Message-ID: <26511220.1160830901629.JavaMail.jira@brutus> Date: Sat, 14 Oct 2006 06:01:41 -0700 (PDT) From: "Geir Magnusson Jr (JIRA)" To: harmony-commits@incubator.apache.org Subject: [jira] Resolved: (HARMONY-1796) [drlvm][jit] The second use of a class that failed to be initialized does not throw NoClassDefFoundError in opt mode In-Reply-To: <33107935.1160460499661.JavaMail.root@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 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N [ http://issues.apache.org/jira/browse/HARMONY-1796?page=all ] Geir Magnusson Jr resolved HARMONY-1796. ---------------------------------------- Resolution: Fixed r463926 Ubuntu 6 - test case, smoke, c-unit, ~kernel > [drlvm][jit] The second use of a class that failed to be initialized does not throw NoClassDefFoundError in opt mode > -------------------------------------------------------------------------------------------------------------------- > > Key: HARMONY-1796 > URL: http://issues.apache.org/jira/browse/HARMONY-1796 > Project: Harmony > Issue Type: Bug > Components: DRLVM > Environment: Windows XP (IA-32), Suse linux 9 (IA-32) > Reporter: Irina Arkhipets > Assigned To: Geir Magnusson Jr > Attachments: HARMONY-1796.diff, test.java > > > The second use of a class that failed to be initialized does not throw NoClassDefFoundError as expected in opt mode. > This bug is not reproducible with interpreter, as well as in jet and default modes. > I am able to reproduce this bug both on Windows IA-32 and Linux IA-32 platforms. > Please, compile and run the following test example to reproduce the failure: > --------- test.java --------- > public class test { > public static void main(String [] args) { > try { > System.out.println(MyClass.val); > } catch (ExceptionInInitializerError e) {} > > try { > new MyClass(); > } catch (NoClassDefFoundError e) { > System.out.println("The test PASSED!"); > System.exit(-1); > } > System.out.println("The test FAILED!"); > } > } > class MyClass { > static int val; > static { > val = 0 / 0; > } > public MyClass() {} > } > ------------------------------- > It is expected that the test throws ExceptionInInitializerError exception (because of division by zero in MyClass class static initializer) and then any attempt to call MyClass methods will cause NoClassDefFoundError. > However, clear opt does not behave in this way and the test fails. > Sample output is: > ... > $> $JAVA_PATH test > The test PASSED! > $> $JAVA_PATH -Xem:opt test > The test FAILED! > ... -- 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