Bug 31811 - VerifyError with huge switch statement
Summary: VerifyError with huge switch statement
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1 RC1   Edit
Assignee: Olivier Thomann CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-13 14:43 EST by Olivier Thomann CLA
Modified: 2003-02-25 06:06 EST (History)
1 user (show)

See Also:


Attachments
Generated file causing verify error (454.07 KB, text/plain)
2003-02-14 06:35 EST, Ian Carr CLA
no flags Details
Compilable subset of files including XScriptParserTokenManager (38.73 KB, text/plain)
2003-02-14 10:05 EST, Ian Carr CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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.