提交 56a4ae55 编写于 作者: N never

7012072: CompileTheWorld causes incorrect class initialization

Reviewed-by: kvn, twisti
上级 bbf41108
...@@ -110,6 +110,8 @@ inline jint invocation_key_to_method_slot(jint key) { ...@@ -110,6 +110,8 @@ inline jint invocation_key_to_method_slot(jint key) {
inline void* index_oop_from_field_offset_long(oop p, jlong field_offset) { inline void* index_oop_from_field_offset_long(oop p, jlong field_offset) {
jlong byte_offset = field_offset_to_byte_offset(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");
#ifdef ASSERT #ifdef ASSERT
if (p != NULL) { if (p != NULL) {
assert(byte_offset >= 0 && byte_offset <= (jlong)MAX_OBJECT_SIZE, "sane offset"); assert(byte_offset >= 0 && byte_offset <= (jlong)MAX_OBJECT_SIZE, "sane offset");
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册