MCPcopy Create free account
hub / github.com/MJx0/KittyMemoryEx / isPtrExecutable

Method isPtrExecutable

KittyMemoryEx/KittyPtrValidator.cpp:283–301  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283bool KittyPtrValidator::isPtrExecutable(uintptr_t ptr, size_t len)
284{
285 if (ptr == 0 || ptr + len < ptr)
286 return false;
287
288 ptr = KittyUtils::untagHeepPtr(ptr);
289
290 uintptr_t end = ptr + len;
291 RegionInfo region(0, 0, false, false, false);
292 while (region.end < end)
293 {
294 if (!_findRegion(ptr, &region) || !region.executable)
295 return false;
296
297 ptr = region.end;
298 }
299
300 return true;
301}

Callers

nothing calls this directly

Calls 1

untagHeepPtrFunction · 0.85

Tested by

no test coverage detected