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

recursion dumps core when JIT enabled.

    XMLWordPrintable

Details

    • jit
    • 1.2fcs
    • x86, sparc
    • generic, solaris_2.6
    • Verified

    Description



      Name: akC45999 Date: 05/18/98



      The following test fails on JDK 1.2beta4F with diagnose:

      Segmentation Fault (core dumped)

      if JIT is enabled. If it is off, test passes.

      ------------------------------ file recur.java
      public class Recur {
         volatile int count=0;

         synchronized double recur(double arg) {
      count++;
      // hack to avoid optimization of tail recursion
      if (arg>0) return recur(Math.sin(arg))+arg;
      else return recur(Math.cos(arg))*arg;
        }

        public static void main(String args[]) {
      Recur rec=new Recur();
      try{
      rec.recur(1.0);
      System.exit(rec.count);
      } catch (StackOverflowError e) {
      System.out.println("count="+rec.count);
      }
        }

      }

      ------------------------------ end of file recur.java



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

      Attachments

        Issue Links

          Activity

            People

              never Tom Rodriguez
              rfqsunw Rfq Rfq (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: