mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Merge pull request #85080 from KushalP/stack-use-after-scope-TaskQueueTest
Fix ASAN stack-use-after-scope errors `Basic/TaskQueueTest.cpp`
This commit is contained in:
@@ -160,8 +160,8 @@ TEST(TaskQueueTest, HighConcurrency) {
|
||||
return TaskFinishedResponse::ContinueExecution;
|
||||
};
|
||||
|
||||
const char *Args[] = {"test", nullptr};
|
||||
for (int i = 0; i < 50; i++) {
|
||||
const char *Args[] = {"test", nullptr};
|
||||
TQ.addTask("/bin/echo", Args, llvm::ArrayRef<const char *>(), nullptr, false);
|
||||
}
|
||||
|
||||
@@ -193,8 +193,8 @@ TEST(TaskQueueTest, TaskBeganCallback) {
|
||||
return TaskFinishedResponse::ContinueExecution;
|
||||
};
|
||||
|
||||
const char *Args[] = {"echo", "test", nullptr};
|
||||
for (int i = 0; i < 3; i++) {
|
||||
const char *Args[] = {"echo", "test", nullptr};
|
||||
TQ.addTask("/bin/echo", Args, llvm::ArrayRef<const char *>(), nullptr, false);
|
||||
}
|
||||
|
||||
@@ -230,8 +230,8 @@ TEST(TaskQueueTest, StopExecutionOnFailure) {
|
||||
return TaskFinishedResponse::ContinueExecution;
|
||||
};
|
||||
|
||||
const char *Args[] = {"test", nullptr};
|
||||
for (int i = 0; i < 10; i++) {
|
||||
const char *Args[] = {"test", nullptr};
|
||||
TQ.addTask("/bin/echo", Args, llvm::ArrayRef<const char *>(), nullptr, false);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user