Mercurial > hg > graal-compiler
comparison src/share/vm/prims/unsafe.cpp @ 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 | b9a918201d47 |
children | 6194aefabf1a |
comparison
equal
deleted
inserted
replaced
9038:8802f66cba62 | 9039:0f090aa237e7 |
---|---|
114 } | 114 } |
115 | 115 |
116 inline void* index_oop_from_field_offset_long(oop p, jlong field_offset) { | 116 inline void* index_oop_from_field_offset_long(oop p, jlong field_offset) { |
117 jlong byte_offset = field_offset_to_byte_offset(field_offset); | 117 jlong byte_offset = field_offset_to_byte_offset(field_offset); |
118 // Don't allow unsafe to be used to read or write the header word of oops | 118 // Don't allow unsafe to be used to read or write the header word of oops |
119 assert(p == NULL || field_offset >= oopDesc::header_size(), "offset must be outside of header"); | 119 // unless running GRAAL which wants to read the misc word for example when |
120 // interpreting computeHashCode(). | |
121 assert(p == NULL || field_offset >= oopDesc::header_size() || GRAAL, "offset must be outside of header"); | |
120 #ifdef ASSERT | 122 #ifdef ASSERT |
121 if (p != NULL) { | 123 if (p != NULL) { |
122 assert(byte_offset >= 0 && byte_offset <= (jlong)MAX_OBJECT_SIZE, "sane offset"); | 124 assert(byte_offset >= 0 && byte_offset <= (jlong)MAX_OBJECT_SIZE, "sane offset"); |
123 if (byte_offset == (jint)byte_offset) { | 125 if (byte_offset == (jint)byte_offset) { |
124 void* ptr_plus_disp = (address)p + byte_offset; | 126 void* ptr_plus_disp = (address)p + byte_offset; |