Community
Participate
Working Groups
Build ID: I20080617-2000 Steps To Reproduce: 1. Compile the following Class using Eclipse ecj: public class Foo { public static void main(final String[] args) { new Foo().verifyError(); } private Object verifyError() { try { if (someBooleanMethod()) { return null; } return getStuff(); } catch (final Exception ex) { return null; } finally { while (someBooleanMethod()) { anyMethod(); } } } private void anyMethod() { // do nothing } private Object getStuff() { return null; } private boolean someBooleanMethod() { return false; } } 2. Try to run it (I tried it using Sun Java 1.5.0_15) 3. Get VerifyError instead of boring, no-output execution: java.lang.VerifyError: (class: Foo, method: verifyError signature: ()Ljava/lang/Object;) Accessing value from uninitialized register 3 More information: This is as far as I could break down the test case (the original code was much more complex). Now when I change anything the VerifyError goes away.
Reproduced with HEAD with compliance 1.5. Compliance 1.6 or 1.4 doesn't produce the problem. I am investigating.
Created attachment 113314 [details] Proposed fix + updated regression tests
Philippe, please review.
Fix looks good. Shouldn't we address it as well in 3.4.2 ? A verifyError due to StackMapTable sounds bad, since the code pattern is not that complex.
Philippe, +1 for 3.4.2 ?
Fixed and released for 3.5M3. Updated existing regression tests. Will reopen if this needs to be addressed for 3.4.2.
Verified for 3.5M3 using build I20081026-2000.