mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
8160399: is_oop_or_null involves undefined behavior
8164984: Improper use of is_oop in production code Replace oop->is_oop*() with oopDesc::is_oop*(oop) so this pointer can be verified Reviewed-by: iklam, kvn, dholmes
This commit is contained in:
parent
61a9f88ca7
commit
3d6d1ec64b
61 changed files with 195 additions and 209 deletions
|
@ -2597,7 +2597,7 @@ void PSParallelCompact::update_deferred_objects(ParCompactionManager* cm,
|
|||
start_array->allocate_block(addr);
|
||||
}
|
||||
cm->update_contents(oop(addr));
|
||||
assert(oop(addr)->is_oop_or_null(), "Expected an oop or NULL at " PTR_FORMAT, p2i(oop(addr)));
|
||||
assert(oopDesc::is_oop_or_null(oop(addr)), "Expected an oop or NULL at " PTR_FORMAT, p2i(oop(addr)));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -3144,7 +3144,7 @@ MoveAndUpdateClosure::do_addr(HeapWord* addr, size_t words) {
|
|||
|
||||
oop moved_oop = (oop) destination();
|
||||
compaction_manager()->update_contents(moved_oop);
|
||||
assert(moved_oop->is_oop_or_null(), "Expected an oop or NULL at " PTR_FORMAT, p2i(moved_oop));
|
||||
assert(oopDesc::is_oop_or_null(moved_oop), "Expected an oop or NULL at " PTR_FORMAT, p2i(moved_oop));
|
||||
|
||||
update_state(words);
|
||||
assert(destination() == (HeapWord*)moved_oop + moved_oop->size(), "sanity");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue