Skip to content

Commit b4e74ae

Browse files
committed
8294514: Wrong initialization of nmethod::_consts_offset for native nmethods
Reviewed-by: kvn, dlong
1 parent 953ce8d commit b4e74ae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hotspot/share/code/nmethod.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -627,7 +627,7 @@ nmethod::nmethod(
627627
_orig_pc_offset = 0;
628628
_gc_epoch = CodeCache::gc_epoch();
629629

630-
_consts_offset = data_offset();
630+
_consts_offset = content_offset() + code_buffer->total_offset_of(code_buffer->consts());
631631
_stub_offset = content_offset() + code_buffer->total_offset_of(code_buffer->stubs());
632632
_oops_offset = data_offset();
633633
_metadata_offset = _oops_offset + align_up(code_buffer->total_oop_size(), oopSize);

0 commit comments

Comments
 (0)