Commit Graph

4 Commits

Author SHA1 Message Date
Guillaume Lessard
d4a9b3f14c Merge pull request #85080 from KushalP/stack-use-after-scope-TaskQueueTest
Fix ASAN stack-use-after-scope errors `Basic/TaskQueueTest.cpp`
2025-10-24 09:38:04 -07:00
Kushal Pisavadia
3dcfdaf531 TaskQueueTest: Fix race condition in TaskSignalHandling test
Replace `sleep` with `condition_variable` synchronization to ensure the child
PID is captured before attempting to kill it. This eliminates timing
dependencies.
2025-10-23 12:57:20 +01:00
Kushal Pisavadia
c2a1a20cac Fix ASAN stack-use-after-scope errors Basic/TaskQueueTest.cpp
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.
2025-10-23 11:00:27 +01:00
Kushal Pisavadia
1075d8c957 Add tests for lib/Basic/TaskQueue.cpp
Validates scenarios like single task execution, parallel task execution,
execution failure handling, and covers the `DummyTaskQueue` fall back.
2025-10-01 21:51:22 +01:00