harmony-commits mailing list archives

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

     [ https://issues.apache.org/jira/browse/HARMONY-4292?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Mikhail Fursov updated HARMONY-4292:
------------------------------------

    Attachment: soe1.patch

soe1.fix: a contract with VM: do not call monexit if SOE happens in synchronized method

> [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
>            Assignee: Mikhail Fursov
>         Attachments: soe1.patch
>
>
> 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