Bug 329822

Summary: [1.7][compiler] Stackoverflow error if compiled in 1.7 compliance mode
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Srikanth Sankaran <srikanth_sankaran>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: jarthana, srikanth_sankaran
Version: 3.7   
Target Milestone: 3.7 M4   
Hardware: PC   
OS: Windows 7   
Whiteboard:

Description Olivier Thomann CLA 2010-11-09 11:02:27 EST
The test case org.eclipse.jdt.core.tests.compiler.regression.MethodVerifyTest#test124

doesn't work if compiled and run in 1.7 mode.
I end up with a StackoverFlow error.

It seems to work in 1.6.
Comment 1 Srikanth Sankaran CLA 2010-11-10 00:36:40 EST
I'll take a look.
Comment 2 Srikanth Sankaran CLA 2010-11-24 04:27:03 EST
I believe this is the intended behavior deliberately
brought about by the fix for bug 207935. See that code
compiled with javac7 also exhibits the same symptom.

Bug 207935's duplicate bug 150655 has some rationale
for the expected behavior including documenting that
the stack overflow is expected.
Comment 3 Srikanth Sankaran CLA 2010-11-24 04:46:02 EST
Adjusted the test to expect stack overflow error in 1.7+
modes. Search the method org.eclipse.jdt.internal.compiler.lookup.Scope.computeCompatibleMethod(MethodBinding, TypeBinding[], InvocationSite) for reference to JDK7 to see the
code that triggers the different behavior.
Comment 4 Jay Arthanareeswaran CLA 2010-12-07 09:36:18 EST
Verified for 3.7M4 by code inspection