Debian Codegraph @

build/build-clang/fuzzing_ccov_build_clang_12.patch

raw
1 From 98bf90ef5ea3dd848ce7d81a662eb7499d11c91c Mon Sep 17 00:00:00 2001
2 From: Calixte Denizet <[email protected]>
3 Date: Fri, 16 Apr 2021 10:05:34 +0200
4 Subject: [PATCH] [Gcov] Don't run global destructor in ccov builds when env
5 MOZ_FUZZING_CCOV is existing
6
7 ---
8 compiler-rt/lib/profile/GCDAProfiling.c | 3 +++
9 1 file changed, 3 insertions(+)
10
11 diff --git a/compiler-rt/lib/profile/GCDAProfiling.c b/compiler-rt/lib/profile/GCDAProfiling.c
12 index 4293e8f7b5bf..6cda4bc7601f 100644
13 --- a/compiler-rt/lib/profile/GCDAProfiling.c
14 +++ b/compiler-rt/lib/profile/GCDAProfiling.c
15 @@ -586,6 +586,9 @@ void llvm_writeout_files(void) {
16 __attribute__((destructor(100)))
17 #endif
18 static void llvm_writeout_and_clear(void) {
19 + if (getenv("MOZ_FUZZING_CCOV")) {
20 + return;
21 + }
22 llvm_writeout_files();
23 fn_list_remove(&writeout_fn_list);
24 }
25 --
26 2.30.2
27