Blame compiler-rt-fuzzer.patch
|
|
e51499b |
--- compiler-rt/lib/fuzzer/FuzzerDriver.cpp.orig 2019-02-13 14:24:24.239239031 -0600
|
|
|
e51499b |
+++ compiler-rt/lib/fuzzer/FuzzerDriver.cpp 2019-02-13 14:28:18.525530281 -0600
|
|
|
e51499b |
@@ -248,13 +248,16 @@
|
|
|
e51499b |
Command Cmd(Args);
|
|
|
e51499b |
Cmd.removeFlag("jobs");
|
|
|
e51499b |
Cmd.removeFlag("workers");
|
|
|
e51499b |
- Vector<std::thread> V;
|
|
|
e51499b |
+ Vector<std::shared_ptr<std::thread>> V;
|
|
|
e51499b |
std::thread Pulse(PulseThread);
|
|
|
e51499b |
Pulse.detach();
|
|
|
e51499b |
- for (unsigned i = 0; i < NumWorkers; i++)
|
|
|
e51499b |
- V.push_back(std::thread(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors));
|
|
|
e51499b |
+ for (unsigned i = 0; i < NumWorkers; i++) {
|
|
|
e51499b |
+ std::shared_ptr<std::thread> wt(new std::thread(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors));
|
|
|
e51499b |
+ V.push_back(wt);
|
|
|
e51499b |
+ }
|
|
|
e51499b |
for (auto &T : V)
|
|
|
e51499b |
- T.join();
|
|
|
e51499b |
+ T->join();
|
|
|
e51499b |
+ Vector<std::shared_ptr<std::thread>>().swap(V);
|
|
|
e51499b |
return HasErrors ? 1 : 0;
|
|
|
e51499b |
}
|
|
|
e51499b |
|