# HG changeset patch # User Doug Simon # Date 1365774737 -7200 # Node ID 0f090aa237e752ca0d2acc5cf334138887f6cf8f # Parent 8802f66cba62ff2feea6ff396046f592a3b54481 weakened assertion in unsafe.cpp for GRAAL builds diff -r 8802f66cba62 -r 0f090aa237e7 src/share/vm/prims/unsafe.cpp --- 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");