| 241 | #endif |
| 242 | |
| 243 | bool KittyPtrValidator::isPtrReadable(uintptr_t ptr, size_t len) |
| 244 | { |
| 245 | if (ptr == 0 || ptr + len < ptr) |
| 246 | return false; |
| 247 | |
| 248 | ptr = KittyUtils::untagHeepPtr(ptr); |
| 249 | |
| 250 | uintptr_t end = ptr + len; |
| 251 | RegionInfo region(0, 0, false, false, false); |
| 252 | while (region.end < end) |
| 253 | { |
| 254 | if (!_findRegion(ptr, ®ion) || !region.readable) |
| 255 | return false; |
| 256 | |
| 257 | ptr = region.end; |
| 258 | } |
| 259 | |
| 260 | return true; |
| 261 | } |
| 262 | |
| 263 | bool KittyPtrValidator::isPtrWritable(uintptr_t ptr, size_t len) |
| 264 | { |
nothing calls this directly
no test coverage detected