Bug 329822 - [1.7][compiler] Stackoverflow error if compiled in 1.7 compliance mode
Summary: [1.7][compiler] Stackoverflow error if compiled in 1.7 compliance mode
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.7   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: 3.7 M4   Edit
Assignee: Srikanth Sankaran CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-09 11:02 EST by Olivier Thomann CLA
Modified: 2010-12-07 09:36 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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