changeset 9039:0f090aa237e7

weakened assertion in unsafe.cpp for GRAAL builds
author Doug Simon <doug.simon@oracle.com>
date Fri, 12 Apr 2013 15:52:17 +0200
parents 8802f66cba62
children d4da9378903d
files src/share/vm/prims/unsafe.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/vm/prims/unsafe.cpp	Fri Apr 12 13:44:44 2013 +0200
+++ b/src/share/vm/prims/unsafe.cpp	Fri Apr 12 15:52:17 2013 +0200
@@ -116,7 +116,9 @@
 inline void* index_oop_from_field_offset_long(oop p, jlong field_offset) {
   jlong byte_offset = field_offset_to_byte_offset(field_offset);
   // Don't allow unsafe to be used to read or write the header word of oops
-  assert(p == NULL || field_offset >= oopDesc::header_size(), "offset must be outside of header");
+  // unless running GRAAL which wants to read the misc word for example when
+  // interpreting computeHashCode().
+  assert(p == NULL || field_offset >= oopDesc::header_size() || GRAAL, "offset must be outside of header");
 #ifdef ASSERT
   if (p != NULL) {
     assert(byte_offset >= 0 && byte_offset <= (jlong)MAX_OBJECT_SIZE, "sane offset");