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-3116) [drlvm][jit][jet] finally block is unreachable when try statement uses while(true) loop
Date Fri, 02 Feb 2007 13:53:05 GMT
[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


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.


Mime
View raw message