Bug 171472 - [1.6][compiler] Illegal stack map frames
Summary: [1.6][compiler] Illegal stack map frames
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.2.1   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: 3.3 M5   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-23 17:25 EST by Olivier Thomann CLA
Modified: 2007-02-06 06:56 EST (History)
2 users (show)

See Also:


Attachments
ecj/1.6 recompiled class (13.26 KB, application/octet-stream)
2007-01-23 17:42 EST, Andrey Loskutov CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Thomann CLA 2007-01-23 17:25:45 EST
Fup of bug 169017, it seems that there is still a case where the stack maps are incorrect.

java.lang.VerifyError: Instruction type does not match stack map in method
org.eclipse.jdt.internal.ui.text.java.CompletionProposalComputerDescriptor.computeCompletionProposals(Lorg/eclipse/jdt/ui/text/java/ContentAssistInvocationContext;Lorg/eclipse/core/runtime/IProgressMonitor;)Ljava/util/List;
at offset 185
Comment 1 Olivier Thomann CLA 2007-01-23 17:27:43 EST
I tried to reproduce the failure unsuccessfully so far. Would it be possible for you to send me the .class file that you got for this class?
Thanks.
Comment 2 Andrey Loskutov CLA 2007-01-23 17:42:26 EST
Created attachment 57388 [details]
ecj/1.6 recompiled class

Compiled with latest ecj (see bug 169017 comment 20) from Eclipse 3.2.1 source distribution and with 1.6 target/source flags.
Comment 3 Olivier Thomann CLA 2007-01-23 18:09:33 EST
Thanks.
I'll continue to investigate.
The .class file you sent is indeed boggus.
Comment 4 Olivier Thomann CLA 2007-01-24 17:14:23 EST
Reproduced.
I need to see why I cannot reproduce when isolating the code.
I am investigating it.
Comment 5 Olivier Thomann CLA 2007-01-25 14:38:50 EST
Isolated a small reproducable case.
Working on a fix.
Comment 6 Olivier Thomann CLA 2007-01-25 22:52:46 EST
Andrei,

I tried a fix and now I can open a java editor without getting a VerifyError for invalid stack frames, but  I am getting the one about the illegal protected access to a constructor that doesn't make sense.
I tried to run it with JDK7b06 and I am getting a IllegalStateException on startup.
You said you had problems as well with JDK7 VMs. What is the same issue?
Comment 7 Olivier Thomann CLA 2007-01-26 09:54:22 EST
Andrei,

You might be interested bu bug 171799.
Once I fixed the issue, I can start Eclipse and open a java editor without getting a VerifyError. Whooo hooo!
Philippe,

ok to release to HEAD?
All tests passed.
Comment 8 Olivier Thomann CLA 2007-01-26 13:06:59 EST
Released for 3.3M5.
Regression tests added in org.eclipse.jdt.core.tests.compiler.regression.StackMapAttributeTest#test029/030
Comment 9 Andrey Loskutov CLA 2007-01-26 15:33:21 EST
Olivier, could you please point me which CVS branch/version you've used for that fix in compiler? Instead to asking you each time for a new ecj.jar file I could just rebuild it by myself, if I would know what I need to checkout.
I'm right that the HEAD of org.eclipse.jdt.core is the branch where the fix is? If not, please give a hint :)
Comment 10 Olivier Thomann CLA 2007-01-26 15:38:14 EST
Yes, it is HEAD.
By default it is always HEAD, unless we backport a fix. Then we specify the branch (3_2_MAINTENANCE, ...).
Comment 11 Andrey Loskutov CLA 2007-01-26 16:30:07 EST
Thank you, Olivier, I could confirm that now it works on 1.7 without any verifier erors (1.6 has still this "protected <init>" VM bug). Now at this weekend I could check how good ecj performs compared with javac :) 
Comment 12 Olivier Thomann CLA 2007-01-26 22:28:14 EST
Thank you for confirming it works fine.
Please keep me inform about the performance results.
Comment 13 Andrey Loskutov CLA 2007-01-27 08:24:41 EST
Olivier, please look at the http://jroller.com/page/andyl?entry=compiler_championship_continued post for numbers.

At least for Eclipse startup time the ecj generated 1.6 code is slightly faster as javac generated by approx 2.6%. This is of course near to the measurement tolerance, but still a good sign.

Now you can tweak the compiler to change 2.6% to 26% :)
Comment 14 Eric Jodet CLA 2007-02-06 06:27:17 EST
verified by user for 3.3 M5