1 Star 0 Fork 21

wangleiat/compiler-rt

forked from src-openEuler/compiler-rt 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-PATCH-compiler-rt-Workaround-libstdc-limitation-wrt..patch 1.55 KB
一键复制 编辑 原始数据 按行查看 历史
chen-jan 提交于 2021-12-26 08:47 . Update to 12.0.1
From 8247295860b69fd379e282c3e6315df9f700e4d8 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][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
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wangleiat/compiler-rt.git
git@gitee.com:wangleiat/compiler-rt.git
wangleiat
compiler-rt
compiler-rt
master

搜索帮助