JDK-6798785 : Crash in OopFlow::build_oop_map: incorrect comparison of 64bit pointers
  • Type: Bug
  • Component: hotspot
  • Sub-Component: compiler
  • Affected Version: 5.0u14,6u6,6u12,6-pool,7-pool
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: linux_redhat_5.2,solaris,solaris_10
  • CPU: x86,sparc
  • Submitted: 2009-01-28
  • Updated: 2016-07-21
  • 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.
Other Other JDK 6 JDK 7 Other
5.0u18-rev,hs11.3Fixed 5.0u19Fixed 6u13-revFixed 7Fixed hs11.3Fixed
Related Reports
Duplicate :  
Relates :  
When defining a Dict you specify the compare and hash functions and Dict provides a couple useful default.  In particular for pointers it provides this:

// Slimey cheap key comparator.
int32 cmpkey(const void *key1, const void *key2) {
  return (int32)((intptr_t)key1 - (intptr_t)key2);

Unforturnately in 64-bit mode this throws away the high 32 bits of the pointer.

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-comp/hotspot/rev/1580954e694c

SUGGESTED FIX // Cheap key comparator. int cmpkey(const void *key1, const void *key2) { if (key1 > key2) return 1; if (key1 == key2) return 0; return -1; }

EVALUATION A traditional 3 way compare would work fine.