Commit cc024af
[rocm-libraries] ROCm/rocm-libraries#5879 (commit 26c1235)
[rocThrust] Disable tests under too large for ASAN in ASAN
builds (#5879)
## Motivation
VectorTests (vector.hip) TestVectorResizeing and TestVectorReserving
attempt to allocate `std::numeric_limits<size_t>::max()` bytes on the
host inside a try/catch block, and test what happens when it fails.
In ASAN builds, this causes ASAN to fail because it cannot allocate a
buffer that large.
## Technical Details
This changes disables these test sizes when running an ASAN build.
## Test Plan
Build rocThrust with `-DADDRESS_SANITIZER=ON` and run the `vector.hip`
target. Verify that it does not crash with message `AddressSanitizer:
requested allocation size ... exceeds maximum supported size.`
## Test Result
Test does not crash with ASAN out of memory error.
## Submission Checklist
- [ ] Look over the contributing guidelines at
https://github.com/ROCm/ROCm/blob/develop/CONTRIBUTING.md#pull-requests.
Co-authored-by: Di Nguyen <dinguyennhu@gmail.com>1 parent f02698e commit cc024af
2 files changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
207 | 207 | | |
208 | 208 | | |
209 | 209 | | |
| 210 | + | |
210 | 211 | | |
211 | 212 | | |
212 | 213 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
676 | 676 | | |
677 | 677 | | |
678 | 678 | | |
| 679 | + | |
679 | 680 | | |
680 | 681 | | |
681 | 682 | | |
| |||
691 | 692 | | |
692 | 693 | | |
693 | 694 | | |
| 695 | + | |
694 | 696 | | |
695 | 697 | | |
696 | 698 | | |
| |||
711 | 713 | | |
712 | 714 | | |
713 | 715 | | |
| 716 | + | |
714 | 717 | | |
715 | 718 | | |
716 | 719 | | |
| |||
721 | 724 | | |
722 | 725 | | |
723 | 726 | | |
| 727 | + | |
724 | 728 | | |
725 | 729 | | |
726 | 730 | | |
| |||
0 commit comments