--- old/src/os_cpu/linux_x86/vm/assembler_linux_x86_64.cpp	Tue May 27 22:58:53 2008
+++ new/src/os_cpu/linux_x86/vm/assembler_linux_x86_64.cpp	Tue May 27 22:58:53 2008
@@ -68,6 +68,12 @@
 
 // NOTE: since the linux kernel resides at the low end of
 // user address space, no null pointer check is needed.
-bool MacroAssembler::needs_explicit_null_check(int offset) {
+bool MacroAssembler::needs_explicit_null_check(intptr_t offset) {
+  if (UseCompressedOops) {
+    uintptr_t heap_base = (uintptr_t)Universe::heap_base();
+    if ((uintptr_t)offset >= heap_base) {
+      offset = (intptr_t)(pointer_delta((void*)offset, (void*)heap_base, 1));
+    }
+  }
   return offset < 0 || offset >= 0x100000;
 }
