Bug 204002 - AIOB when enabling CLDC 1.1
Summary: AIOB when enabling CLDC 1.1
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.3   Edit
Hardware: PC Windows XP
: P3 major (vote)
Target Milestone: 3.4 M2   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-19 12:11 EDT by Martin Aeschlimann CLA
Modified: 2007-09-25 10:07 EDT (History)
1 user (show)

See Also:


Attachments
Proposed fix (3.27 KB, patch)
2007-09-19 13:11 EDT, Olivier Thomann CLA
no flags Details | Diff
Regression tests (5.78 KB, patch)
2007-09-19 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 Martin Aeschlimann CLA 2007-09-19 12:11:47 EDT
20070919-0010

- fresh workspace
- create a project 'Test'
- import JUnit 3.8.1 source in its source folder
- go to the project's compiler property page and switch the classfile compliance to CLDC 1.1
(compliance 1.3, classfile CLDC 1.1, source 1.3, ignore, ignore, all classfile options checked)

java.lang.ArrayIndexOutOfBoundsException: -1
	at org.eclipse.jdt.internal.compiler.codegen.StackMapFrame.addStackItem(StackMapFrame.java:105)
	at org.eclipse.jdt.internal.compiler.ClassFile.traverse(ClassFile.java:7858)
	at org.eclipse.jdt.internal.compiler.ClassFile.completeCodeAttribute(ClassFile.java:2123)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:238)
	at org.eclipse.jdt.internal.compiler.ast.AbstractMethodDeclaration.generateCode(AbstractMethodDeclaration.java:173)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:529)
	at org.eclipse.jdt.internal.compiler.ast.TypeDeclaration.generateCode(TypeDeclaration.java:580)
	at org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration.generateCode(CompilationUnitDeclaration.java:214)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:855)
	at org.eclipse.jdt.core.dom.CompilationUnitResolver.resolve(CompilationUnitResolver.java:517)
	at org.eclipse.jdt.core.dom.ASTParser.internalCreateAST(ASTParser.java:869)
	at org.eclipse.jdt.core.dom.ASTParser.createAST(ASTParser.java:653)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider$1.run(ASTProvider.java:540)
	at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.createAST(ASTProvider.java:533)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:474)
	at org.eclipse.jdt.internal.ui.javaeditor.ASTProvider.getAST(ASTProvider.java:462)
	at org.eclipse.jdt.ui.SharedASTProvider.getAST(SharedASTProvider.java:122)
	at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$PartListenerGroup.calculateASTandInform(SelectionListenerWithASTManager.java:168)
	at org.eclipse.jdt.internal.ui.viewsupport.SelectionListenerWithASTManager$3.run(SelectionListenerWithASTManager.java:153)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
Comment 1 Olivier Thomann CLA 2007-09-19 12:21:10 EDT
I am investigating.
This could also mean that the 1.6 code generation might be broken since CLDC and 1.6 are sharing the underlying stack frames.
Comment 2 Olivier Thomann CLA 2007-09-19 13:11:16 EDT
Created attachment 78773 [details]
Proposed fix
Comment 3 Olivier Thomann CLA 2007-09-19 14:30:49 EDT
Created attachment 78779 [details]
Regression tests
Comment 4 Olivier Thomann CLA 2007-09-19 15:36:12 EDT
Released for 3.4M2.
Regression tests added in org.eclipse.jdt.core.tests.compiler.regression.Compliance_CLDC#test001
Comment 5 Frederic Fusier CLA 2007-09-25 10:07:14 EDT
Verified for 3.4M2 using build I20070921-0919.