This repository was archived by the owner on Mar 21, 2024. It is now read-only.
Commit c9fe022
committed
Fix issues in testing/allocator.cu.
- The `g_state` flag wasn't reset between executions.
- The `destroy` method was being invoke in the current host system,
not the system that owned the allocated memory (always cpp).
This broke on MSVC's OpenMP implementation, where it seemed to be
asserting the `g_state` flag before it was updated by `destroy`.
This only happened on MSVC when host system = OMP, and appears to
be a bug/miscompile in MSVC (repro'd on 2019). Fixed by explicitly
tagging the allocator system to cpp.
- Added check that `destroy` is not invoked on empty vectors.1 parent 427a0c2 commit c9fe022
1 file changed
Lines changed: 10 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
63 | 63 | | |
64 | 64 | | |
65 | 65 | | |
66 | | - | |
67 | | - | |
68 | | - | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
69 | 72 | | |
70 | 73 | | |
71 | 74 | | |
| |||
120 | 123 | | |
121 | 124 | | |
122 | 125 | | |
| 126 | + | |
| 127 | + | |
123 | 128 | | |
124 | 129 | | |
125 | 130 | | |
126 | 131 | | |
127 | | - | |
128 | | - | |
| 132 | + | |
| 133 | + | |
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
| |||
0 commit comments