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

Nightly test: misc/jit_tests/t056 fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P1 P1
    • 2.0
    • 1.0, 2.0
    • hotspot
    • None
    • beta
    • x86
    • windows_nt

      The c2 elides a catch that it should not elide.

      To reproduce:
      =============

         java -Xcomp -XX:CompileOnly=t056.r11 t056

         (sourcecode included below)

      Output:
      =======

        Calling r14: caught in r44
        Calling r13: caught in r33
        Calling r12: caught in r22
        Calling r11: Exception in thread "main" java.lang.Throwable
              at t056.r41(t056.java:81)
              at t056.r31(t056.java:78)
              at t056.r21(t056.java:77)
              at t056.r11(t056.java:68)
              at t056.main(t056.java:90)

      Expected output is:

        Calling r14: caught in r44
        Calling r13: caught in r33
        Calling r12: caught in r22
        Calling r11: caught in r11

      Source
      ======

      class t056
      {
          // Routine nest in which exception is thrown and caught in
          // the fourth routine.

          static void r14(){r24();}
          static void r24(){r34();}
          static void r34(){r44();}
          static void r44()
          {
              try
              {
                  Throwable t = new Throwable();
                  throw t;
              }
              catch(Throwable t)
              {
                  System.out.println("caught in r44");
              }
          }

          // Thrown in the fourth; caught in the third.

          static void r13(){r23();}
          static void r23(){r33();}
          static void r33()
          {
              try
              {
                  r43();
              }
              catch(Throwable t)
              {
                  System.out.println("caught in r33");
              }
          }
          static void r43() throws Throwable
          {
              Throwable t = new Throwable();
              throw t;
          }

          // Thrown in fourth; caught in second.

          static void r12(){r22();}
          static void r22()
          {
              try
              {
                  r32();
              }
              catch(Throwable t)
              {
                  System.out.println("caught in r22");
              }
          }
          static void r32() throws Throwable {r42();}
          static void r42() throws Throwable
          {
              Throwable t = new Throwable();
              throw t;
          }

          // Thrown in fourth; caught in first.

          static void r11()
          {
              try
              {
                  r21();
              }
              catch(Throwable t)
              {
                  System.out.println("caught in r11");
              }
          }
          static void r21() throws Throwable {r31();}
          static void r31() throws Throwable {r41();}
          static void r41() throws Throwable
          {
              Throwable t = new Throwable();
              throw t;
          }

          public static void main(String argv[])
          {
              System.out.print("Calling r14: "); r14();
              System.out.print("Calling r13: "); r13();
              System.out.print("Calling r12: "); r12();
              System.out.print("Calling r11: "); r11();
          }
      }


            cclicksunw Clifford Click (Inactive)
            rschmidtsunw Rene Schmidt (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: