Skip to content

Commit

Permalink
8255598: [PPC64] assert(Universe::heap()->is_in(result)) failed: obje…
Browse files Browse the repository at this point in the history
…ct not in heap

Reviewed-by: ayang, tschatzl
  • Loading branch information
TheRealMDoerr committed Nov 10, 2020
1 parent e281b13 commit 9d07259
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/hotspot/cpu/ppc/nativeInst_ppc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,11 @@ intptr_t NativeMovConstReg::data() const {
CodeBlob* cb = CodeCache::find_blob_unsafe(addr);
if (MacroAssembler::is_set_narrow_oop(addr, cb->content_begin())) {
narrowOop no = MacroAssembler::get_narrow_oop(addr, cb->content_begin());
return cast_from_oop<intptr_t>(CompressedOops::decode(no));
// We can reach here during GC with 'no' pointing to new object location
// while 'heap()->is_in' still reports false (e.g. with SerialGC).
// Therefore we use raw decoding.
if (CompressedOops::is_null(no)) return 0;
return cast_from_oop<intptr_t>(CompressedOops::decode_raw(no));
} else {
assert(MacroAssembler::is_load_const_from_method_toc_at(addr), "must be load_const_from_pool");

Expand Down

1 comment on commit 9d07259

@openjdk-notifier
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.