mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 14:54:52 +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
|
@ -3207,7 +3207,7 @@ class VerifyFieldClosure: public OopClosure {
|
|||
protected:
|
||||
template <class T> void do_oop_work(T* p) {
|
||||
oop obj = oopDesc::load_decode_heap_oop(p);
|
||||
if (!obj->is_oop_or_null()) {
|
||||
if (!oopDesc::is_oop_or_null(obj)) {
|
||||
tty->print_cr("Failed: " PTR_FORMAT " -> " PTR_FORMAT, p2i(p), p2i(obj));
|
||||
Universe::print_on(tty);
|
||||
guarantee(false, "boom");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue