File tree Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Expand file tree Collapse file tree 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -197,7 +197,11 @@ intptr_t NativeMovConstReg::data() const {
197
197
CodeBlob* cb = CodeCache::find_blob_unsafe (addr);
198
198
if (MacroAssembler::is_set_narrow_oop (addr, cb->content_begin ())) {
199
199
narrowOop no = MacroAssembler::get_narrow_oop (addr, cb->content_begin ());
200
- return cast_from_oop<intptr_t >(CompressedOops::decode (no));
200
+ // We can reach here during GC with 'no' pointing to new object location
201
+ // while 'heap()->is_in' still reports false (e.g. with SerialGC).
202
+ // Therefore we use raw decoding.
203
+ if (CompressedOops::is_null (no)) return 0 ;
204
+ return cast_from_oop<intptr_t >(CompressedOops::decode_raw (no));
201
205
} else {
202
206
assert (MacroAssembler::is_load_const_from_method_toc_at (addr), " must be load_const_from_pool" );
203
207
You can’t perform that action at this time.
0 commit comments