Community
Participate
Working Groups
When compiled and run under eclipse-2.1, the program below will produce: java.lang.VerifyError: (class: TrySwitch, method: m signature: (I)I) Inconsistent stack height 0 != 1 --------------------------------------------------- public class TrySwitch { public static void main(String[] args) throws Throwable { m(10); } static boolean done = true; static int m(int i) { try { switch(i) { default: return 10; case 10: if (false) { break; } else { throw new RuntimeException(); } case 11: break; } } catch (Throwable e) { System.err.println("caught: " + e); } return 33; } } --------------------------------------------------- This is the smallest test case I could create which replicates the original bug. The original code is generated by the JACK Java agent tool so simple workarounds like removing the silly "if (false)" are very hard to apply in practice. This bug was originally submitted by Feilong Chen [mailto:f0c5023@cs.tamu.edu] as a bug in the AspectJ-1.1 compiler which is built on top of the JDT-1.1 compiler. Any questions about JACK or suggested practical workaround should be handled by Feilong Chen. BTW - The AspectJ team has been very impressed with the quality of your work. This is the first serious bug report we've had which turned out to be in the underlying JDT compiler we built on top of.
This is a duplicate of a bug resolved since 2.1. The fix is integrated into our 2.1.1 delivery (we should be finalized soon). *** This bug has been marked as a duplicate of 37621 ***