Commit c2a1a20
committed
Fix ASAN stack-use-after-scope errors
The issue was that in three tests, the `Args` arrays were being declared inside
for loops.
When `TQ.addTask()` was called, it stored a pointer to the `Args` array. As the
`Args` array was declared in the loop, it would go out of scope at the end of
each iteration whilst `TaskQueue` held a pointer to it.Basic/TaskQueueTest.cpp
1 parent 0e4dc2f commit c2a1a20
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
149 | 149 | | |
150 | 150 | | |
151 | 151 | | |
| 152 | + | |
152 | 153 | | |
153 | | - | |
154 | 154 | | |
155 | 155 | | |
156 | 156 | | |
| |||
182 | 182 | | |
183 | 183 | | |
184 | 184 | | |
| 185 | + | |
185 | 186 | | |
186 | | - | |
187 | 187 | | |
188 | 188 | | |
189 | 189 | | |
| |||
219 | 219 | | |
220 | 220 | | |
221 | 221 | | |
| 222 | + | |
222 | 223 | | |
223 | | - | |
224 | 224 | | |
225 | 225 | | |
226 | 226 | | |
| |||
0 commit comments