harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vera Petrashkova (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-4292) [drlvm][jit][opt] Jitrino.OPT crashes instead of throwing StackOverfowError when synchronized method is invoked recursively
Date Wed, 27 Jun 2007 14:59:26 GMT
[drlvm][jit][opt] Jitrino.OPT crashes instead of throwing  StackOverfowError when synchronized
method is invoked recursively
----------------------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-4292
                 URL: https://issues.apache.org/jira/browse/HARMONY-4292
             Project: Harmony
          Issue Type: Bug
          Components: DRLVM
         Environment: Windows
            Reporter: Vera Petrashkova


The following test demonstrates that Jitrino.OPT crashes instead of throwing StackOverflowError

when  synchronized method is invoked recursively
--------------------------recTest.java------------------
public class recTest {

    public static void main(String[] args) {
        new recTest().test();
    }

    private static int count;

    public void test() {
        try {
            func();
            System.err.println("TEST FAILED. SOE was not thrown");
        } catch (StackOverflowError e) {
            if (count > 255) {
                System.err.println("TEST PASSED, count=" + count);
            } else {
                System.err.println("TEST FAILED: too short stack ("
                                + count + ")");
            }
        }
    }

    private synchronized  void func() {
        count++;
        func();
    }
}
----------------------------------------------
Output on 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 = r550333, (Jun 25 2007), Windows/ia32/msvc 1310, release build
http://harmony.apache.org


Output on Jitrino.jet 
===============
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 = r550333, (Jun 25 2007), Windows/ia32/msvc 1310, release build
http://harmony.apache.org
TEST PASSED, count=4169


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


Mime
View raw message