Bug 93588 - [compiler] java.lang.VerifyError: Looks similar to 60040 but is happening on current release
Summary: [compiler] java.lang.VerifyError: Looks similar to 60040 but is happening on ...
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0.2   Edit
Hardware: PC Windows XP
: P3 blocker (vote)
Target Milestone: 3.1 M7   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-05-03 16:17 EDT by Gary Hewett CLA
Modified: 2005-05-11 13:38 EDT (History)
1 user (show)

See Also:


Attachments
Sample code which exhibits problem behaviour (863 bytes, application/octet-stream)
2005-05-03 16:19 EDT, Gary Hewett CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gary Hewett CLA 2005-05-03 16:17:58 EDT
Problem occurs during "running" of a Java application:

java.lang.VerifyError: (class: com/quickbusiness/courier/Class2, method: run
signature: ()V) Expecting to find long on stack
Exception in thread "main" 

I *think* I've narrowed it down to this line in the code...

Thread.sleep(interval = interval + 100);

I've created a dummy class which exhibits this problem. I'll try to attach that
Class as a seperate file.

PS: I don't claim to be the worlds greatest programmer so go easy on me please :)
Comment 1 Gary Hewett CLA 2005-05-03 16:19:44 EDT
Created attachment 20653 [details]
Sample code which exhibits problem behaviour
Comment 2 Gary Hewett CLA 2005-05-03 16:20:49 EDT
Problem is also occuring identically on Mac Powerbook G4 
Comment 3 Gary Hewett CLA 2005-05-03 16:28:39 EDT
Confirmed - I changed this line in my "real" code and things now run under Eclipse. 

Old: 
     Thread.sleep(interval = interval + 100);

New: 
     interval = interval + 100;
     Thread.sleep(interval);

Yet the "old" code both compiles and runs under the "same" jar in Windows and
Mac when I run from the command line. 
Comment 4 Darin Swanson CLA 2005-05-03 16:33:50 EDT
Moving to JDT Core...
Comment 5 Philipe Mulet CLA 2005-05-09 09:44:17 EDT
Reproduced in 3.1 stream as well.
Comment 6 Philipe Mulet CLA 2005-05-09 10:01:15 EDT
Also note that:
    Thread.sleep(interval += 100);
would work fine.
Somehow one bytecode generation is losing the conversion from int to long, when
optimizing "interval = interval + 100" into "interval += 100".
Comment 7 Philipe Mulet CLA 2005-05-09 12:44:03 EDT
Optimized code gen was missing extra implicit conversion on SingleNameReference.
Also fixed eval side.

Added AssignmentTest#test037.
Fixed
Comment 8 Olivier Thomann CLA 2005-05-11 13:38:52 EDT
Verified in I20050510-0010 + JDT/Core from HEAD.