Bug 236336 - [1.6][compiler] Stack map generation error with 10,000-line method in Java
Summary: [1.6][compiler] Stack map generation error with 10,000-line method in Java
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.4   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.4.1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-06-09 20:36 EDT by zz CLA
Modified: 2008-08-29 04:20 EDT (History)
6 users (show)

See Also:


Attachments
Proposed fix + regression tests (125.39 KB, patch)
2008-06-10 14:30 EDT, Olivier Thomann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description zz CLA 2008-06-09 20:36:50 EDT
In our current codes we have several java methods which contains more than 10,000 lines, JDT in Eclipse3.4R3(with IBM JDK1.6,compile compliance level:1.6) will thrown some JDT related errors when compiling the java classes contained such kind of methods.  We changed the method to 1 line and the compiling error disappeared. Another finding is that if we didn't change the code, only changed the Java compiler's compliance level to 1.5, the compiling error also disappeared. 
 
It seems to us that there is some limitation/restriction in Eclipse3.4's JDT + JDK1.6 , since these 10,000-line methods can be compiled successfully in Eclipse3.3 + JDK1.5.  

Error detail:
Internal compiler error java.lang.IllegalArgumentException: info cannot be null at 
 org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:81) at 
 org.eclipse.jdt.internal.compiler.ClassFile.traverse(ClassFile.java:7498) at 
 org.eclipse.jdt.internal.compiler.ClassFile.completeCodeAttribute(ClassFile.java:1613) at 
 org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:
 244) at 
 org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:
 188) at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:530) at 
 org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:581) at 
 org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:356) 
 at org.eclipse.jdt.internal.compiler.Compiler.process(Compiler.java:755) at 
 org.eclipse.jdt.internal.compiler.ProcessTaskManager.run(ProcessTaskManager.java:137) at 
 java.lang.Thread.run(Thread.java:735)
Comment 1 Olivier Thomann CLA 2008-06-09 22:59:57 EDT
I'll investigate.
Comment 2 Philipe Mulet CLA 2008-06-10 04:39:44 EDT
Marking for 3.4.1
Comment 3 Olivier Thomann CLA 2008-06-10 14:30:36 EDT
Created attachment 104362 [details]
Proposed fix + regression tests

This should be backported to 3.3.x.
Comment 4 Philipe Mulet CLA 2008-06-10 17:11:29 EDT
+1 for 3.3.x
Comment 5 Philipe Mulet CLA 2008-06-12 03:56:02 EDT
Confirming 3.4.1 is the target for this one.
Comment 6 Olivier Thomann CLA 2008-06-12 11:47:44 EDT
(In reply to comment #4)
> +1 for 3.3.x
In fact 3.3.x is not concerned by this patch as it doesn't contain the fix for bug 185350.
Comment 7 Olivier Thomann CLA 2008-06-12 11:52:01 EDT
Added org.eclipse.jdt.core.tests.compiler.regression.StackMapAttributeTest#test036 for 3.3.x stream.
Comment 8 Philipe Mulet CLA 2008-06-30 07:22:19 EDT
Jerome - pls release Olivier's patch for 3.4.1 integration.
Olivier - pls verify, and release it to 3.5 when you return.
Comment 9 Jerome Lanneluc CLA 2008-07-01 07:25:05 EDT
Proposed fix and regression test released for 3.4.1.
Note that a binary patch is being prepared and should be available soon.

Keeping the bug opened until Olivier releases the fix and tests in HEAD.
Comment 10 Olivier Thomann CLA 2008-07-07 13:07:44 EDT
Released for 3.5M1.
Comment 11 Olivier Thomann CLA 2008-07-08 13:07:48 EDT
Fixed.
Comment 12 Kent Johnson CLA 2008-08-06 12:33:56 EDT
Verified for 3.5M1 using I20080805-1307
Comment 13 Cheng-Yee Lin CLA 2008-08-07 19:12:44 EDT
Can the JDT team confirm that the fix is indeed included in the Eclipse 3.4.1 builds?

The problem appears to be in the 7/24 buikd (eclipse-JDT-SDK-M20080724-0918.zip).
Comment 14 Olivier Thomann CLA 2008-08-08 08:50:39 EDT
(In reply to comment #13)
> The problem appears to be in the 7/24 buikd
> (eclipse-JDT-SDK-M20080724-0918.zip).
Then this is a different problem. The fix for the problem is included in this build.
I tried the regression test and it fails on 3.4.0 and it works on 07/24 build.
Comment 15 Olivier Thomann CLA 2008-08-08 13:03:31 EDT
The fix should be included in v_875_R34x or above (3.4 maintenance) or v_902 (HEAD stream).
Let me know as soon as possible if you can reproduce the failure with such a build. 
Comment 16 Frederic Fusier CLA 2008-08-29 04:20:37 EDT
Verified for 3.4.1 using M20080827-2000.