Details
Description
oopDesc::is_oop_or_null is an ordinary member function, whose definition includes a test using the expression "this == NULL". However, this can be assumed to never be NULL, as that would require undefined behavior. So the compiler is free to optimize away that test, eliminating the "_or_null" part of the function's intended semantics. Recent versions of gcc (like gcc 6) seem to be more aggressive about optimizations around that sort of thing, leading to crashes.
Attachments
Issue Links
- duplicates
-
JDK-8160363 assert(discovered->is_oop_or_null()) failed: Expected an oop or NULL for discovered field at 0x0000000000000000
-
- Resolved
-
- relates to
-
JDK-8160310 HotSpot cannot be built with GCC 6
-
- Resolved
-
-
JDK-8202171 Some oopDesc functions compare this with NULL
-
- Resolved
-
-
JDK-8244538 Undefined behaviour in JDK 8u HotSpot
-
- Resolved
-