Summary: | java.lang.VerifyError / Illegal target of jump or branch compiling with 3.0 M5 | ||||||
---|---|---|---|---|---|---|---|
Product: | [Eclipse Project] JDT | Reporter: | St.efan <sjung> | ||||
Component: | Core | Assignee: | Philipe Mulet <philippe_mulet> | ||||
Status: | VERIFIED FIXED | QA Contact: | |||||
Severity: | blocker | ||||||
Priority: | P3 | ||||||
Version: | 3.0 | ||||||
Target Milestone: | 3.0 M6 | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
St.efan
2003-12-01 02:12:33 EST
Created attachment 7013 [details]
Compiling and running this code on 3.0 M5 gives the error.
Reproduced Simpler testcase: public class X { public static void main(String[] args) { do { int i = 0; if (i > 0) break; System.out.println("SUCCESS"); return; } while (true == false); } } public static void main(java.lang.String[]); Code: 0: iconst_0 1: istore_1 2: iload_1 3: ifle 9 6: goto 18 9: getstatic #18; //Field .out:Ljava/io/PrintStream; 12: ldc #20; //String SUCCESS 14: invokevirtual #26; //Method PrintStream.println:(Ljava/lang/String;)V 17: return 18: return Bytecode 18 is no longer generated Problem is due to the new merge for flow info in DO statement. It is slightly different from the merge of a while statement, as breaks may occur before the condition is executed (path where we optimize false case). Fixed by always turning off the #isOptimizedFalse flag to ensure we merge properly. This change isn't necessary for while/for loops as the condition is evaluated prior to any break (and thus break inits are already fake reachable on the optimized false case). Added regression test: Conform#test238 Fixed Verified for 3.0M6 |