United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-4907940 StackoverflowError in javac after error report
JDK-4907940 : StackoverflowError in javac after error report

Details
Type:
Bug
Submit Date:
2003-08-17
Status:
Resolved
Updated Date:
2003-10-14
Project Name:
JDK
Resolved Date:
2003-10-14
Component:
tools
OS:
solaris_9,solaris_8,windows_xp
Sub-Component:
javac
CPU:
x86,sparc,other,generic
Priority:
P3
Resolution:
Fixed
Affected Versions:
1.4.2,1.4.2_04,1.4-pool,5.0
Fixed Versions:
5.0 (b24)

Related Reports
Backport:
Backport:
Backport:
Duplicate:

Sub Tasks

Description
The following program causes the compiler to report two errors and then crash:

public class Test2 {
    public void h() {
        f(g() + g());
    }
}

                                    

Comments
EVALUATION

Right, we should move from an exponential algorithm to a linear one.

###@###.### 2003-09-05
                                     
2003-09-05
PUBLIC COMMENTS

...
                                     
2004-06-10
SUGGESTED FIX

------- Resolve.java -------
*** /tmp/sccs.aGaqm1    Sat Aug 16 22:00:00 2003
--- Resolve.java        Sat Aug 16 21:52:34 2003
***************
*** 517,524 ****
  
      /* Return the most specific of the two methods for a call,
       *  given that both are accessible and applicable.
!      *  @param m1             Once choice for most specific.
!      *  @param m2             The other possible most specific method.
       *  @param env            The current environment.
       *  @param site           The original type from where the selection
       *                                takes place.
--- 517,524 ----
  
      /* Return the most specific of the two methods for a call,
       *  given that both are accessible and applicable.
!      *  @param m1             A new candidate for most specific.
!      *  @param m2             The previous most specific candidate.
       *  @param env            The current environment.
       *  @param site           The original type from where the selection
       *                                takes place.
***************
*** 574,580 ****
            Symbol err2 = mostSpecific(m1, e.sym2, env, site, allowBoxing, useVarargs);
            if (err1 == err2) return err1;
            if (err1 == e.sym1 && err2 == e.sym2) return m2;
!           return new AmbiguityError(err1, err2);
        default:
            throw new AssertionError();
        }
--- 574,585 ----
            Symbol err2 = mostSpecific(m1, e.sym2, env, site, allowBoxing, useVarargs);
            if (err1 == err2) return err1;
            if (err1 == e.sym1 && err2 == e.sym2) return m2;
!           if (err1 instanceof AmbiguityError &&
!               err2 instanceof AmbiguityError &&
!               ((AmbiguityError)err1).sym1 == ((AmbiguityError)err2).sym1)
!               return new AmbiguityError(m1, m2);
!           else
!               return new AmbiguityError(err1, err2);
        default:
            throw new AssertionError();
        }
                                     
2004-06-11
CONVERTED DATA

BugTraq+ Release Management Values

COMMIT TO FIX:
tiger
tiger-beta

FIXED IN:
tiger
tiger-beta

INTEGRATED IN:
tiger-b24
tiger-beta


                                     
2004-06-14



Hardware and Software, Engineered to Work Together