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:
Coleen Phillimore 2017-08-23 14:52:55 -04:00
parent 61a9f88ca7
commit 3d6d1ec64b
61 changed files with 195 additions and 209 deletions

View file

@ -287,9 +287,9 @@ class oopDesc {
inline bool is_unlocked() const;
inline bool has_bias_pattern() const;
// asserts
inline bool is_oop(bool ignore_mark_word = false) const;
inline bool is_oop_or_null(bool ignore_mark_word = false) const;
// asserts and guarantees
static bool is_oop(oop obj, bool ignore_mark_word = false);
static bool is_oop_or_null(oop obj, bool ignore_mark_word = false);
#ifndef PRODUCT
inline bool is_unlocked_oop() const;
#endif