Commit d82664f
authored
[SWDEV-563823][Compiler-rt][ASan] Simplify API Logic 'asan_hsa_amd_ipc_memory_create'. (#475)
- Use reinterpret_cast<uptr> for pointer arithmetic.
- Add sanitizer interception logic for api 'hsa_amd_pointer_info'.
- Allow only valid values of ptr and len in non-ASan mode.
- ptr == Actual agentBaseAddress && len ==
original_len_used_in_alloc
- Allow only valid values of ptr and len in ASan mode.
- Here pinfo is retrieved from external hsa_amd_pointer_info(not
internal device allocator function AmdgpuMemFuncs::GetPointerInfo)
- ptr == pinfo.agentBaseAddress && len == pinfo.sizeInBytes
- ptr == original_ptr_returned_by_ASAN && len ==
original_len_used_in_alloc1 parent aa47a98 commit d82664f
File tree
3 files changed
+64
-11
lines changed- compiler-rt/lib/asan
3 files changed
+64
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1399 | 1399 | | |
1400 | 1400 | | |
1401 | 1401 | | |
1402 | | - | |
| 1402 | + | |
| 1403 | + | |
| 1404 | + | |
| 1405 | + | |
1403 | 1406 | | |
1404 | 1407 | | |
1405 | 1408 | | |
| |||
1452 | 1455 | | |
1453 | 1456 | | |
1454 | 1457 | | |
1455 | | - | |
1456 | | - | |
1457 | | - | |
1458 | | - | |
1459 | | - | |
| 1458 | + | |
| 1459 | + | |
| 1460 | + | |
| 1461 | + | |
| 1462 | + | |
| 1463 | + | |
| 1464 | + | |
1460 | 1465 | | |
1461 | | - | |
1462 | | - | |
1463 | | - | |
1464 | | - | |
| 1466 | + | |
| 1467 | + | |
| 1468 | + | |
| 1469 | + | |
| 1470 | + | |
| 1471 | + | |
1465 | 1472 | | |
1466 | | - | |
| 1473 | + | |
1467 | 1474 | | |
1468 | 1475 | | |
1469 | 1476 | | |
| |||
1540 | 1547 | | |
1541 | 1548 | | |
1542 | 1549 | | |
| 1550 | + | |
| 1551 | + | |
| 1552 | + | |
| 1553 | + | |
| 1554 | + | |
| 1555 | + | |
| 1556 | + | |
| 1557 | + | |
| 1558 | + | |
| 1559 | + | |
| 1560 | + | |
| 1561 | + | |
| 1562 | + | |
| 1563 | + | |
| 1564 | + | |
| 1565 | + | |
| 1566 | + | |
| 1567 | + | |
| 1568 | + | |
| 1569 | + | |
| 1570 | + | |
| 1571 | + | |
| 1572 | + | |
| 1573 | + | |
| 1574 | + | |
| 1575 | + | |
| 1576 | + | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
1543 | 1581 | | |
1544 | 1582 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
341 | 341 | | |
342 | 342 | | |
343 | 343 | | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
344 | 349 | | |
345 | 350 | | |
346 | 351 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
948 | 948 | | |
949 | 949 | | |
950 | 950 | | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
951 | 960 | | |
952 | 961 | | |
953 | 962 | | |
| |||
962 | 971 | | |
963 | 972 | | |
964 | 973 | | |
| 974 | + | |
965 | 975 | | |
966 | 976 | | |
967 | 977 | | |
| |||
0 commit comments