| 261 | } |
| 262 | |
| 263 | bool 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, ®ion) || !region.writable) |
| 275 | return false; |
| 276 | |
| 277 | ptr = region.end; |
| 278 | } |
| 279 | |
| 280 | return true; |
| 281 | } |
| 282 | |
| 283 | bool KittyPtrValidator::isPtrExecutable(uintptr_t ptr, size_t len) |
| 284 | { |
nothing calls this directly
no test coverage detected