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

REGRESSION: Stack overflow when compiling hundreds of StringBuffer.append

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P3 P3
    • None
    • 5.0
    • tools
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.4.2_10"
      Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_10-b03)
      Java HotSpot(TM) Client VM (build 1.4.2_10-b03, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Windows XP: 4NT 3.02B Windows NT 5.01

      A DESCRIPTION OF THE PROBLEM :
      The following class compiles fine with JDK 1.3.1_xx but not with JDK 1.4.2_xx.
      This is a mock-up of a real test, and it contains 503 concatenated calls to append. It compiles fine with 500, but it fails with more than that. Breaking the call will probably fix it, but I would like to know why it worked on 1.3.


      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Compiling the code above is enough to cause the bug.

      ACTUAL -
      The system is out of resources.
      Consult the following stack trace for details.
      java.lang.StackOverflowError

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      This is the beginning of the stack trace
      The system is out of resources.
      Consult the following stack trace for details.
      java.lang.StackOverflowError
              at com.sun.tools.javac.v8.comp.Attr.visitIdent(Attr.java:1018)
              at com.sun.tools.javac.v8.tree.Tree$Ident.accept(Tree.java:1111)
              at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
              at com.sun.tools.javac.v8.comp.Attr.attribType(Attr.java:228)
              at com.sun.tools.javac.v8.comp.Attr.visitNewClass(Attr.java:791)
              at com.sun.tools.javac.v8.tree.Tree$NewClass.accept(Tree.java:902)
              at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
              at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java:1071)
              at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java:1091)
              at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
              at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java:213)
              at com.sun.tools.javac.v8.comp.Attr.visitApply(Attr.java:733)
              at com.sun.tools.javac.v8.tree.Tree$Apply.accept(Tree.java:877)
              at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
              at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java:1071)
              at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java:1091)
              at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
              at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java:213)
              at com.sun.tools.javac.v8.comp.Attr.visitApply(Attr.java:733)

      and the end
            at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java:1091)
            at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
            at com.sun.tools.javac.v8.comp.Attr.attribExpr(Attr.java:213)
            at com.sun.tools.javac.v8.comp.Attr.visitApply(Attr.java:733)
            at com.sun.tools.javac.v8.tree.Tree$Apply.accept(Tree.java:877)
            at com.sun.tools.javac.v8.comp.Attr.attribTree(Attr.java:198)
            at com.sun.tools.javac.v8.comp.Attr.visitSelect(Attr.java:1071)
            at com.sun.tools.javac.v8.tree.Tree$Select.accept(Tree.java:1091)

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Attached separately
      ---------- END SOURCE ----------

      Release Regression From : 1.3.1
      The above release value was the last known release where this
      bug was known to work. Since then there has been a regression.

            ahe Peter Ahe
            ndcosta Nelson Dcosta (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: