summaryrefslogtreecommitdiffstats
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
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
-rw-r--r--compiler-rt-fuzzer.patch23
-rw-r--r--swift-lang.spec7
2 files changed, 29 insertions, 1 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;
+ }
+
diff --git a/swift-lang.spec b/swift-lang.spec
index c733d63..909f426 100644
--- a/swift-lang.spec
+++ b/swift-lang.spec
@@ -6,7 +6,7 @@
%global __provides_exclude ^/usr/lib/swift-lldb/.*\\.so.*
Name: swift-lang
Version: 5.0
-Release: 0.32.%{swiftgitdate}git%{swiftgithash}%{?dist}
+Release: 0.33.%{swiftgitdate}git%{swiftgithash}%{?dist}
Summary: Apple's Swift programming language
License: ASL 2.0
URL: https://swift.org
@@ -29,6 +29,7 @@ Source14: swift-lang-runtime.conf
Patch0: change-lldb-location.patch
Patch1: no-ninja-build.patch
Patch2: clangloc.patch
+Patch3: compiler-rt-fuzzer.patch
BuildRequires: clang
BuildRequires: cmake
@@ -112,6 +113,8 @@ mv swift-xcode-playground-support-swift-%{swifttag} swift-xcode-playground-suppo
# This changes the location of where the headers and libs are to keep lldb happy
%patch2 -p0
+# Fixes an issue with using std::thread in a vector in compiler-rt
+%patch3 -p0
%build
export VERBOSE=1
@@ -208,6 +211,8 @@ install -m 0644 %{_builddir}/usr/share/man/man1/swift.1 %{buildroot}%{_mandir}/m
%changelog
+* Wed Feb 13 2019 Ron Olson <tachoknight@gmail.com> 5.0-0.33.20190206gitd07c25a
+- Added patch to fix an issue with compiler-rt using std::thread in a vector
* Fri Feb 08 2019 Ron Olson <tachoknight@gmail.com> 5.0-0.32.20190206gitd07c25a
- Added patch to allow the Swift REPL to work properly, also removed patch
for aarch64 because the changes were merged upstream