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

Method isPtrWritable

KittyMemoryEx/KittyPtrValidator.cpp:263–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

261}
262
263bool KittyPtrValidator::isPtrWritable(uintptr_t ptr, size_t len)
264{
265 if (ptr == 0 || ptr + len < ptr)
266 return false;
267
268 ptr = KittyUtils::untagHeepPtr(ptr);
269
270 uintptr_t end = ptr + len;
271 RegionInfo region(0, 0, false, false, false);
272 while (region.end < end)
273 {
274 if (!_findRegion(ptr, &region) || !region.writable)
275 return false;
276
277 ptr = region.end;
278 }
279
280 return true;
281}
282
283bool KittyPtrValidator::isPtrExecutable(uintptr_t ptr, size_t len)
284{

Callers

nothing calls this directly

Calls 1

untagHeepPtrFunction · 0.85

Tested by

no test coverage detected