Community
Participate
Working Groups
Using latest, there is a case where the stack map frame type APPEND is used instead of a FULL FRAME type. I will attach a test case.
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
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.