Bug 31811

Summary: VerifyError with huge switch statement
Product: [Eclipse Project] JDT Reporter: Olivier Thomann <Olivier_Thomann>
Component: CoreAssignee: Olivier Thomann <Olivier_Thomann>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: icarr
Version: 2.1   
Target Milestone: 2.1 RC1   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Generated file causing verify error
none
Compilable subset of files including XScriptParserTokenManager none

Description Olivier Thomann CLA 2003-02-13 14:43:06 EST
From EC,

I am compiling the output of a JavaCC generated parser from a complex
grammar.
One of the methods in the token manager contains a number of pretty large
switch statelements.

If I compile the code using the eclipse compiler the resulting app fails
with a Verify errror:

java.lang.VerifyError: (class: XScriptParserTokenManager, method:
jjMoveNfa_0 signature: (II)I) Illegal target of jump or branch
at XScriptParser.<init>(XScriptParser.java:3956)
at XScriptParser.main(XScriptParser.java:64)
Exception in thread "main"

The same code compiled with the SUN javac from j2sdk1.4.1_01 works as
expected

The build used is M5.
Comment 1 Philipe Mulet CLA 2003-02-14 05:14:17 EST
Can we get a testcase reproducing the problem ? Did it work with M3 or M4 ?
Comment 2 Philipe Mulet CLA 2003-02-14 05:15:02 EST
Cannot tag for 2.1 unless we get some reproduceable testcase.
Comment 3 Ian Carr CLA 2003-02-14 06:35:50 EST
Created attachment 3489 [details]
Generated file causing verify error

Method causing the error appears to be jjMoveNfa_0
Comment 4 Olivier Thomann CLA 2003-02-14 09:34:00 EST
Could you please attach all the necessary files to compile this code?
SimpleCharStream, the implemented interface.
Thanks. It will allow me to investigate more quickly.
Comment 5 Ian Carr CLA 2003-02-14 10:05:13 EST
Created attachment 3494 [details]
Compilable subset of files including XScriptParserTokenManager

Note the XScriptParserTokenManager is not the same as the original, as I have
been working on it today, however the one in the zip file still exhibits the
same error, so please take all of the files as a new whole. I have checked them
out in a new project and get no compile messages.
Comment 6 Olivier Thomann CLA 2003-02-14 11:50:04 EST
Problem reproduced. I am investigating.
Comment 7 Olivier Thomann CLA 2003-02-14 13:50:42 EST
I am testing a fix right now. Thanks for the test case and the bug report. This
wasn't a new bug. We have it since day 1.
I will add regression tests.
Comment 8 Olivier Thomann CLA 2003-02-14 22:42:50 EST
Fixed and released in 2.1 stream.
Regression test added.
Comment 9 David Audel CLA 2003-02-25 06:06:42 EST
Verified.