this-pointer NULL-checks in hotspot codebase [-Wtautological-undefined-compare]
Florian Weimer
fweimer at redhat.com
Fri Jul 12 15:36:32 UTC 2019
* Matthias Baesken:
> Do you think the NULL-checks can be removed or is there still some
> value in doing them ?
I believe you need to build OpenJDK in a mode where the compiler assumes
that the this pointer can be null:
# These flags are required for GCC 6 builds as undefined behaviour in
# OpenJDK code runs afoul of the more aggressive versions of these
# optimisations. Notably, value range propagation now assumes that
# the this pointer of C++ member functions is non-null.
Thanks,
Florian
More information about the hotspot-dev
mailing list