summaryrefslogtreecommitdiffstats
path: root/build/build-clang/fuzzing_ccov_build_clang_12.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-19 01:47:29 +0000
commit0ebf5bdf043a27fd3dfb7f92e0cb63d88954c44d (patch)
treea31f07c9bcca9d56ce61e9a1ffd30ef350d513aa /build/build-clang/fuzzing_ccov_build_clang_12.patch
parentInitial commit. (diff)
downloadfirefox-esr-upstream/115.8.0esr.tar.xz
firefox-esr-upstream/115.8.0esr.zip
Adding upstream version 115.8.0esr.upstream/115.8.0esr
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'build/build-clang/fuzzing_ccov_build_clang_12.patch')
-rw-r--r--build/build-clang/fuzzing_ccov_build_clang_12.patch27
1 files changed, 27 insertions, 0 deletions
diff --git a/build/build-clang/fuzzing_ccov_build_clang_12.patch b/build/build-clang/fuzzing_ccov_build_clang_12.patch
new file mode 100644
index 0000000000..1b60a95b91
--- /dev/null
+++ b/build/build-clang/fuzzing_ccov_build_clang_12.patch
@@ -0,0 +1,27 @@
+From 98bf90ef5ea3dd848ce7d81a662eb7499d11c91c Mon Sep 17 00:00:00 2001
+From: Calixte Denizet <calixte.denizet@gmail.com>
+Date: Fri, 16 Apr 2021 10:05:34 +0200
+Subject: [PATCH] [Gcov] Don't run global destructor in ccov builds when env
+ MOZ_FUZZING_CCOV is existing
+
+---
+ compiler-rt/lib/profile/GCDAProfiling.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
+index 4293e8f7b5bf..6cda4bc7601f 100644
+--- a/compiler-rt/lib/profile/GCDAProfiling.c
++++ b/compiler-rt/lib/profile/GCDAProfiling.c
+@@ -586,6 +586,9 @@ void llvm_writeout_files(void) {
+ __attribute__((destructor(100)))
+ #endif
+ static void llvm_writeout_and_clear(void) {
++ if (getenv("MOZ_FUZZING_CCOV")) {
++ return;
++ }
+ llvm_writeout_files();
+ fn_list_remove(&writeout_fn_list);
+ }
+--
+2.30.2
+