8345505: Fix -Wzero-as-null-pointer-constant warnings in zero code

Reviewed-by: dholmes
This commit is contained in:
Kim Barrett 2024-12-13 04:49:11 +00:00
parent db9eab3f29
commit 28e49e978a

View File

@ -125,10 +125,10 @@ bool frame::safe_for_sender(JavaThread *thread) {
bool frame::is_interpreted_frame_valid(JavaThread *thread) const {
assert(is_interpreted_frame(), "Not an interpreted frame");
// These are reasonable sanity checks
if (fp() == 0 || (intptr_t(fp()) & (wordSize-1)) != 0) {
if (fp() == nullptr || (intptr_t(fp()) & (wordSize-1)) != 0) {
return false;
}
if (sp() == 0 || (intptr_t(sp()) & (wordSize-1)) != 0) {
if (sp() == nullptr || (intptr_t(sp()) & (wordSize-1)) != 0) {
return false;
}
// These are hacks to keep us out of trouble.