harmony-commits mailing list archives

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

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

Gregory Shimansky commented on HARMONY-4292:
--------------------------------------------

The patch looks ok to me. I think however that if there is a contract with VM as you write,
it should be also commented on the JIT side if there is such place. From the patch it looks
as the contract is only in VM with JIT.

> [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