JDK-6744422 : incorrect handling of -1 in set_jump_destination
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: hs14
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: solaris_9
  • CPU: sparc
  • Submitted: 2008-09-03
  • Updated: 2011-03-07
  • Resolved: 2011-03-07
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7 Other
6u14Fixed 7Fixed hs14Fixed
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 http://hg.openjdk.java.net/jdk7/hotspot/hotspot/rev/3a26e9e4be71
04-09-2008

EVALUATION oops.
03-09-2008

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
03-09-2008