Bug 26129

Summary: JACKS: VerifyError, because opcode jsr_w not used
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: philippe_mulet
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: PC   
OS: Windows 2000   
Whiteboard:
Attachments:
Description Flags
Test case
none
Fix for this problem none

Description Olivier Thomann CLA 2002-11-13 12:08:55 EST
Using 1112, compile the following test case (see attached file) and run it.
You will get:
java.lang.VerifyError: (class: A, method: main signature:
([Ljava/lang/String;)V) Illegal target of jump or branch
Exception in thread "main" 

The opcode jsr_w should be used instead of jsr.
Comment 1 Olivier Thomann CLA 2002-11-13 12:09:33 EST
Created attachment 2399 [details]
Test case

Compile this code.
Comment 2 Olivier Thomann CLA 2002-11-13 12:30:10 EST
Created attachment 2400 [details]
Fix for this problem

Fix proposal.
Comment 3 Olivier Thomann CLA 2002-11-13 12:31:01 EST
Need further testing, but it should work quite well. I used the same approach
than for goto_w.
Comment 4 Philipe Mulet CLA 2002-11-14 08:56:06 EST
Do we need the extra method ? Isn't there a simpler way to just target the 
field ?
Comment 5 Olivier Thomann CLA 2002-11-14 09:00:41 EST
I wanted to keep the code in a method, but we can inline it if necessary. We 
should realize that this almost never happen. Only in compiler tests :-), so we 
don't need to "optimize" such a case.
Comment 6 Olivier Thomann CLA 2002-11-14 12:05:58 EST
Change summary.
Comment 7 Olivier Thomann CLA 2002-11-18 10:29:15 EST
Fixed and released in 2.1 stream.
Regression test added.
Comment 8 David Audel CLA 2002-12-17 10:15:05 EST
Verified.