You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@harmony.apache.org by "Alex Astapchuk (JIRA)" <ji...@apache.org> on 2007/02/07 05:33:06 UTC

[jira] Updated: (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 ]

Alex Astapchuk updated HARMONY-3116:
------------------------------------

    Attachment: 0001-drlvm-jet-.jet-does-not-insert-GC-safepoints-into-some-endless-loops.txt

The fix. 
The problem was that .jet detected back branches as "current_pc < target_pc".
This resulted in leaving the endless 'GOTO itself" (current_pc == target_pc) without the yield point.


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