diff --git a/src/hotspot/share/nmt/mallocTracker.cpp b/src/hotspot/share/nmt/mallocTracker.cpp index 3e7160d660c..ea14ddc1e20 100644 --- a/src/hotspot/share/nmt/mallocTracker.cpp +++ b/src/hotspot/share/nmt/mallocTracker.cpp @@ -212,7 +212,7 @@ bool MallocTracker::print_pointer_information(const void* p, outputStream* st) { const uint8_t* const end = here - (0x1000 + sizeof(MallocHeader)); // stop searching after 4k for (; here >= end; here -= smallest_possible_alignment) { // JDK-8306561: cast to a MallocHeader needs to guarantee it can reside in readable memory - if (!os::is_readable_range(here, here + sizeof(MallocHeader) - 1)) { + if (!os::is_readable_range(here, here + sizeof(MallocHeader))) { // Probably OOB, give up break; }