summaryrefslogtreecommitdiffstats
path: root/compiler-rt-fuzzer.patch
diff options
context:
space:
mode:
authorRon Olson <tachoknight@gmail.com>2019-02-13 14:40:44 -0600
committerRon Olson <tachoknight@gmail.com>2019-02-13 14:40:44 -0600
commit4170714a641a4474c7f9f8aa816ec601a38ce9df (patch)
tree6a7f664a71f5fbec4e7136d6e8e553864f25c80f /compiler-rt-fuzzer.patch
parent7478cc89e61125e8b67d703a5c35a5cbbb2a5702 (diff)
downloadswift-lang-4170714a641a4474c7f9f8aa816ec601a38ce9df.tar.gz
swift-lang-4170714a641a4474c7f9f8aa816ec601a38ce9df.tar.xz
swift-lang-4170714a641a4474c7f9f8aa816ec601a38ce9df.zip
Added patch for compiler-rt issue with std::thread
Diffstat (limited to 'compiler-rt-fuzzer.patch')
-rw-r--r--compiler-rt-fuzzer.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/compiler-rt-fuzzer.patch b/compiler-rt-fuzzer.patch
new file mode 100644
index 0000000..b0e779a
--- /dev/null
+++ b/compiler-rt-fuzzer.patch
@@ -0,0 +1,23 @@
+--- compiler-rt/lib/fuzzer/FuzzerDriver.cpp.orig 2019-02-13 14:24:24.239239031 -0600
++++ compiler-rt/lib/fuzzer/FuzzerDriver.cpp 2019-02-13 14:28:18.525530281 -0600
+@@ -248,13 +248,16 @@
+ Command Cmd(Args);
+ Cmd.removeFlag("jobs");
+ Cmd.removeFlag("workers");
+- Vector<std::thread> V;
++ Vector<std::shared_ptr<std::thread>> V;
+ std::thread Pulse(PulseThread);
+ Pulse.detach();
+- for (unsigned i = 0; i < NumWorkers; i++)
+- V.push_back(std::thread(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors));
++ for (unsigned i = 0; i < NumWorkers; i++) {
++ std::shared_ptr<std::thread> wt(new std::thread(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors));
++ V.push_back(wt);
++ }
+ for (auto &T : V)
+- T.join();
++ T->join();
++ Vector<std::shared_ptr<std::thread>>().swap(V);
+ return HasErrors ? 1 : 0;
+ }
+