Commit 01d565c
committed
[sanitizer-common] Improve mach_vm_region_recurse error handling
Some sanitizers use mach_vm_region_recurse on macOS to find a sufficiently
large gap to allocate shadow memory. Some sandboxes do not allow this.
When we get KERN_DENIED, we suggest to the user that it may have been
blocked by the sandbox.
For error codes other than KERN_INVALID_ADDRESS and KERN_DENIED,
we make sure to log a message and not use the address.
rdar://1458603831 parent a6585b0 commit 01d565c
File tree
2 files changed
+58
-7
lines changed- compiler-rt
- lib/sanitizer_common
- test/asan/TestCases/Darwin
2 files changed
+58
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1265 | 1265 | | |
1266 | 1266 | | |
1267 | 1267 | | |
1268 | | - | |
1269 | | - | |
1270 | | - | |
1271 | | - | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
| 1276 | + | |
| 1277 | + | |
| 1278 | + | |
| 1279 | + | |
1272 | 1280 | | |
1273 | 1281 | | |
1274 | | - | |
1275 | | - | |
| 1282 | + | |
| 1283 | + | |
| 1284 | + | |
| 1285 | + | |
| 1286 | + | |
| 1287 | + | |
1276 | 1288 | | |
1277 | | - | |
| 1289 | + | |
| 1290 | + | |
| 1291 | + | |
| 1292 | + | |
| 1293 | + | |
1278 | 1294 | | |
| 1295 | + | |
1279 | 1296 | | |
1280 | 1297 | | |
1281 | 1298 | | |
| |||
Lines changed: 34 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
0 commit comments