United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6744422 incorrect handling of -1 in set_jump_destination
JDK-6744422 : incorrect handling of -1 in set_jump_destination

Details
Type:
Bug
Submit Date:
2008-09-03
Status:
Closed
Updated Date:
2011-03-07
Project Name:
JDK
Resolved Date:
2011-03-07
Component:
hotspot
OS:
solaris_9
Sub-Component:
compiler
CPU:
sparc
Priority:
P3
Resolution:
Fixed
Affected Versions:
hs14
Fixed Versions:
hs14 (b04)

Related Reports
Backport:
Backport:

Sub Tasks

Description
The fix for 5108146 unified the handling jumps which are set to -1 but part of the logic from 64 bit was lost in the merge, resulting in incorrect jump destinations for clean ICs.

                                    

Comments
EVALUATION

oops.
                                     
2008-09-03
SUGGESTED FIX

diff --git a/src/cpu/x86/vm/nativeInst_x86.hpp b/src/cpu/x86/vm/nativeInst_x86.hpp                                                   
--- a/src/cpu/x86/vm/nativeInst_x86.hpp                                                                                              
+++ b/src/cpu/x86/vm/nativeInst_x86.hpp                                                                                              
@@ -391,6 +391,9 @@ class NativeJump: public NativeInstructi
                                                                                                                                     
   void  set_jump_destination(address dest)  {                                                                                       
     intptr_t val = dest - next_instruction_address();                                                                               
+    if (dest == (address) -1) {                                                                                                     
+      val = -5; // jump to self                                                                                                     
+    }                                                                                                                               
 #ifdef AMD64                                                                                                                        
     assert((labs(val)  & 0xFFFFFFFF00000000) == 0 || dest == (address)-1, "must be 32bit offset or -1");                            
 #endif // AMD64
                                     
2008-09-03
EVALUATION

http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/3a26e9e4be71
                                     
2008-09-04



Hardware and Software, Engineered to Work Together