Summary: | [1.6][compiler] ClassFormatError : wrong stack map frame is used | ||||||||
---|---|---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | Olivier Thomann <Olivier_Thomann> | ||||||
Component: | Core | Assignee: | Olivier Thomann <Olivier_Thomann> | ||||||
Status: | VERIFIED FIXED | QA Contact: | |||||||
Severity: | normal | ||||||||
Priority: | P3 | CC: | daniel_megert, martinae, Mike_Wilson, steven.wasleski | ||||||
Version: | 3.2 | ||||||||
Target Milestone: | 3.2 RC7 | ||||||||
Hardware: | PC | ||||||||
OS: | Windows XP | ||||||||
Whiteboard: | |||||||||
Attachments: |
|
Description
Olivier Thomann
2006-05-25 10:20:59 EDT
public class X { String s; X() { int i = 0; if (s == null) { System.out.print("PASSED"); } else { System.out.print("FAILED"); } System.out.print("DONE" + i); } public static void main(String argv[]) { new X(); } } If this code is compiled in 1.6 mode, it compiles fine, but it failed at runtime with a class format error. Created attachment 42574 [details]
Proposed fix
Created attachment 42575 [details]
Regression test
I am surprised that this is not a verify error. The "format" of the .class file is fine. The error is a wrong type of frame. I believe a verify error would be more appropriate. Fix looks good. Proposing for RC7, as it is needed for 1.6 compliance testing (as reported by Steven Wasleski). Steven - can you confirm that the proposed patch makes us pass ? The fix is trivial, and is mandated for true 1.6 compliance Martin - pls cast your vote Dani - pls cast your vote Mike - pls cast your vote +1 for 3.2RC7 +1 +1 +1 Fixed and released in HEAD. Regression test added in org.eclipse.jdt.core.tests.compiler.regression.StackMapAttributeTest.test008 In order to verify this, you should use a recent 1.6 drop (b84 can reproduce the original failure). Verified with I20060602-1317 for RC7. |