Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4296537

java -native with JIT hangs while getting unexistent Component object

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.2.2
    • hotspot
    • x86
    • linux



      Name: kaC94536 Date: 12/03/99



      The following test hangs Linux JVM (JDK1.2.2-G) which is running with JIT and
      with native
      threads. Test is executed OK in other three modes with/without JIT or
      with/without native
      threads.

      ------------------------------ test.java ------------------------------
      import java.awt.*;

      public class test {
         public static void main( String[] argv ) {
            int[] values = {0,0};
            Panel p = new Panel();
            for(int i=0; i<values.length; i++) {
               try {
                  p.getComponent(values[i]);
                  System.out.println("ArrayIndexOutOfBoundsException must be thrown");
               }
               catch (ArrayIndexOutOfBoundsException e) {
                  System.out.println("catch " + i);
               }
            }
         }
      }
      -------------------------------- output -------------------------------
      [kdos@linux-1 ~/test]$ java -fullversion
      java full version "1.2.2-G"
      [kdos@linux-1 ~/test]$ java test
      catch 0
      catch 1
      [kdos@linux-1 ~/test]$ java -Djava.compiler=none test
      Warning: JIT compiler "none" not found. Will use interpreter.
      catch 0
      catch 1
      [kdos@linux-1 ~/test]$ java -native -Djava.compiler=none
      test
      Warning: JIT compiler "none" not found. Will use interpreter.
      catch 0
      catch 1
      [kdos@linux-1 ~/test]$ java -native test
      catch 0
      Killed // because of infinite execution
      [kdos@linux-1 ~/test]$

      ======================================================================

      ======================================================================

            hongzh Hong Zhang
            kanisimosunw Konstantin Anisimov (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: