Blame SOURCES/0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch

356306
From f4d4ada2e920136870468f43e0f3c1efa265f2f7 Mon Sep 17 00:00:00 2001
356306
From: serge-sans-paille <sguelton@redhat.com>
356306
Date: Thu, 25 Feb 2021 14:12:57 +0100
356306
Subject: [PATCH] [PATCH][compiler-rt] Workaround libstdc++ limitation wrt.
356306
 thread copy
356306
356306
---
356306
 compiler-rt/lib/fuzzer/FuzzerDefs.h     | 6 ++++++
356306
 compiler-rt/lib/fuzzer/FuzzerDriver.cpp | 2 +-
356306
 2 files changed, 7 insertions(+), 1 deletion(-)
356306
356306
diff --git a/compiler-rt/lib/fuzzer/FuzzerDefs.h b/compiler-rt/lib/fuzzer/FuzzerDefs.h
356306
index 1a2752a..abfbb8d 100644
356306
--- a/compiler-rt/lib/fuzzer/FuzzerDefs.h
356306
+++ b/compiler-rt/lib/fuzzer/FuzzerDefs.h
356306
@@ -50,6 +50,12 @@ template<typename T>
356306
 
356306
       template<class Other>
356306
       struct rebind { typedef fuzzer_allocator<Other> other;  };
356306
+
356306
+      template< class U, class... Args >
356306
+      void construct( U* p, Args&&... args ) {
356306
+        std::allocator<T>::construct(p, std::forward<Args>(args)...);
356306
+      }
356306
+
356306
   };
356306
 
356306
 template<typename T>
356306
diff --git a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
356306
index 447cafc..2fce139 100644
356306
--- a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
356306
+++ b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp
356306
@@ -294,7 +294,7 @@ static int RunInMultipleProcesses(const Vector<std::string> &Args,
356306
   std::thread Pulse(PulseThread);
356306
   Pulse.detach();
356306
   for (unsigned i = 0; i < NumWorkers; i++)
356306
-    V.push_back(std::thread(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors));
356306
+    V.emplace_back(WorkerThread, std::ref(Cmd), &Counter, NumJobs, &HasErrors);
356306
   for (auto &T : V)
356306
     T.join();
356306
   return HasErrors ? 1 : 0;
356306
-- 
356306
1.8.3.1
356306