Rename, cleanup and normalize patch serie
This commit is contained in:
parent
86bef4a8d9
commit
14f50f317a
@ -0,0 +1,44 @@
|
||||
From f4d4ada2e920136870468f43e0f3c1efa265f2f7 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Thu, 25 Feb 2021 14:12:57 +0100
|
||||
Subject: [PATCH] [PATCH][compiler-rt] Workaround libstdc++ limitation wrt.
|
||||
thread copy
|
||||
|
||||
---
|
||||
compiler-rt/lib/fuzzer/FuzzerDefs.h | 6 ++++++
|
||||
compiler-rt/lib/fuzzer/FuzzerDriver.cpp | 2 +-
|
||||
2 files changed, 7 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/compiler-rt/lib/fuzzer/FuzzerDefs.h b/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
index 1a2752a..abfbb8d 100644
|
||||
--- a/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
+++ b/compiler-rt/lib/fuzzer/FuzzerDefs.h
|
||||
@@ -50,6 +50,12 @@ template<typename T>
|
||||
|
||||
template<class Other>
|
||||
struct rebind { typedef fuzzer_allocator<Other> other; };
|
||||
+
|
||||
+ template< class U, class... Args >
|
||||
+ void construct( U* p, Args&&... args ) {
|
||||
+ std::allocator<T>::construct(p, std::forward<Args>(args)...);
|
||||
+ }
|
||||
+
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
diff --git a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
|
||||
index 447cafc..2fce139 100644
|
||||
--- a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
|
||||
+++ b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
|
||||
@@ -294,7 +294,7 @@ static int RunInMultipleProcesses(const Vector<std::string> &Args,
|
||||
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));
|
||||
+ V.emplace_back(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors);
|
||||
for (auto &T : V)
|
||||
T.join();
|
||||
return HasErrors ? 1 : 0;
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,28 +0,0 @@
|
||||
diff -ru compiler-rt-8.0.0rc1.src.orig/lib/fuzzer/FuzzerDefs.h compiler-rt-8.0.0rc1.src/lib/fuzzer/FuzzerDefs.h
|
||||
--- compiler-rt-8.0.0rc1.src.orig/lib/fuzzer/FuzzerDefs.h 2019-01-09 21:46:09.000000000 +0000
|
||||
+++ compiler-rt-8.0.0rc1.src/lib/fuzzer/FuzzerDefs.h 2019-02-12 14:03:32.971147814 +0000
|
||||
@@ -176,6 +176,12 @@
|
||||
|
||||
template<class Other>
|
||||
struct rebind { typedef fuzzer_allocator<Other> other; };
|
||||
+
|
||||
+ template< class U, class... Args >
|
||||
+ void construct( U* p, Args&&... args ) {
|
||||
+ std::allocator<T>::construct(p, std::forward<Args>(args)...);
|
||||
+ }
|
||||
+
|
||||
};
|
||||
|
||||
template<typename T>
|
||||
diff -ru compiler-rt-8.0.0rc1.src.orig/lib/fuzzer/FuzzerDriver.cpp compiler-rt-8.0.0rc1.src/lib/fuzzer/FuzzerDriver.cpp
|
||||
--- compiler-rt-8.0.0rc1.src.orig/lib/fuzzer/FuzzerDriver.cpp 2019-01-15 22:12:51.000000000 +0000
|
||||
+++ compiler-rt-8.0.0rc1.src/lib/fuzzer/FuzzerDriver.cpp 2019-02-12 13:05:15.965113872 +0000
|
||||
@@ -252,7 +252,7 @@
|
||||
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));
|
||||
+ V.emplace_back(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors);
|
||||
for (auto &T : V)
|
||||
T.join();
|
||||
return HasErrors ? 1 : 0;
|
@ -20,7 +20,7 @@ Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{versio
|
||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{crt_srcdir}.tar.xz.sig
|
||||
Source2: tstellar-gpg-key.asc
|
||||
|
||||
Patch0: 0001-PATCH-std-thread-copy.patch
|
||||
Patch0: 0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
|
Loading…
Reference in New Issue
Block a user