[compiler-rt] [libFuzzer] Fix incorrect coverage number in fork mode (PR #82335)
Scallop Ye via llvm-commits
llvm-commits at lists.llvm.org
Tue Feb 20 02:25:30 PST 2024
https://github.com/yescallop created https://github.com/llvm/llvm-project/pull/82335
Closes #82307.
I tried to build LLVM and test the changes but failed with the following error:
```
/usr/bin/ld: cannot find /home/ye/work/llvm-project/build/lib/clang/19/lib/linux/libclang_rt.fuzzer-x86_64.a: No such file or directory
/usr/bin/ld: cannot find /home/ye/work/llvm-project/build/lib/clang/19/lib/linux/libclang_rt.fuzzer_interceptors-x86_64.a: No such file or directory
/usr/bin/ld: cannot find /home/ye/work/llvm-project/build/lib/clang/19/lib/linux/libclang_rt.ubsan_standalone-x86_64.a: No such file or directory
/usr/bin/ld: cannot find /home/ye/work/llvm-project/build/lib/clang/19/lib/linux/libclang_rt.ubsan_standalone_cxx-x86_64.a: No such file or directory
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```
I have no idea how to fix this. It'd be nice if you could help me with testing the changes.
>From f2cc184c3fcf7bf3cd063fbfd2ce96406232084a Mon Sep 17 00:00:00 2001
From: Scallop Ye <yescallop at gmail.com>
Date: Tue, 20 Feb 2024 17:42:48 +0800
Subject: [PATCH] [libFuzzer] Fix incorrect coverage number in fork mode
---
compiler-rt/lib/fuzzer/FuzzerFork.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/compiler-rt/lib/fuzzer/FuzzerFork.cpp b/compiler-rt/lib/fuzzer/FuzzerFork.cpp
index c248a1d246a306..e544cd846e4db5 100644
--- a/compiler-rt/lib/fuzzer/FuzzerFork.cpp
+++ b/compiler-rt/lib/fuzzer/FuzzerFork.cpp
@@ -349,7 +349,7 @@ void FuzzWithFork(Random &Rand, const FuzzingOptions &Options,
&NewFeatures, Env.Cov, &NewCov, CFPath,
/*Verbose=*/false, /*IsSetCoverMerge=*/false);
Env.Features.insert(NewFeatures.begin(), NewFeatures.end());
- Env.Cov.insert(NewFeatures.begin(), NewFeatures.end());
+ Env.Cov.insert(NewCov.begin(), NewCov.end());
RemoveFile(CFPath);
}
More information about the llvm-commits
mailing list