You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alexey Varlamov (JIRA)" <ji...@apache.org> on 2007/03/16 13:38:09 UTC

[jira] Closed: (HARMONY-3116) [drlvm][jit][jet] finally block is unreachable when try statement uses while(true) loop

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

Alexey Varlamov closed HARMONY-3116.
------------------------------------


> [drlvm][jit][jet] finally block is unreachable when try statement uses while(true) loop
> ---------------------------------------------------------------------------------------
>
>                 Key: HARMONY-3116
>                 URL: https://issues.apache.org/jira/browse/HARMONY-3116
>             Project: Harmony
>          Issue Type: Bug
>          Components: DRLVM
>         Environment: Windows and Linux
>            Reporter: Vera Petrashkova
>         Assigned To: Alexey Varlamov
>         Attachments: 0001-drlvm-jet-.jet-does-not-insert-GC-safepoints-into-some-endless-loops.txt
>
>
> The following test demonstrates that finally block becomes unreachable on Jitrino/JET when while(true) loop is used in try statement.
> VM hangs. 
> On Jitrino/OPT and interpreter this test finishes successfully
> --------------------
> public class testFinally {
>     public static boolean started= false;
>     public static void main(String[] args) throws Exception {
>         Thread t  = new Thread(new TT());
>         t.start();
>         while(!started){
>         }
>         t.stop();
>         System.err.println("Thread.stop()");
>     }
>     static class TT implements Runnable {    
>         public void run() {
>             started = true;
>             try{
>                 synchronized(this) {
>                     while (true){
>                     }
>                 }
>             } finally {
>                 System.err.println("PASSED: thread was interrupted ");
>             }
>         }
>     }
> }
> ---------------------
> VM reports  "Thread.stop()" and gangs.
> On Jitrino/OPT output is:
> Thread.stop() 
> PASSED: thread was interrupted 

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