[PATCH] D145040: Add test for Flags.data_flow_trace
Vitaly Buka via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 7 22:18:49 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG67f5b05cdcdc: Add test for Flags.data_flow_trace (authored by yingcong-wu, committed by vitalybuka).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145040/new/
https://reviews.llvm.org/D145040
Files:
compiler-rt/lib/fuzzer/FuzzerDriver.cpp
compiler-rt/test/fuzzer/dataflow.test
Index: compiler-rt/test/fuzzer/dataflow.test
===================================================================
--- compiler-rt/test/fuzzer/dataflow.test
+++ compiler-rt/test/fuzzer/dataflow.test
@@ -97,6 +97,11 @@
L20_FUZZM-NEXT: F2 00000000000000000001{{$}}
L20_FUZZM-NOT: F
+# Don't crash with missing data_flow args.
+RUN: rm -rf %t-DFT
+RUN: %t-ThreeFunctionsTest -collect_data_flow=%t-ThreeFunctionsTestDF
+RUN: %t-ThreeFunctionsTest -data_flow_trace=%t-DFT %t/IN/FUZZMU
+
# Test libFuzzer's built in DFT collection.
RUN: rm -rf %t-DFT
RUN: %t-ThreeFunctionsTest -collect_data_flow=%t-ThreeFunctionsTestDF -data_flow_trace=%t-DFT %t/IN/FUZZMU
Index: compiler-rt/lib/fuzzer/FuzzerDriver.cpp
===================================================================
--- compiler-rt/lib/fuzzer/FuzzerDriver.cpp
+++ compiler-rt/lib/fuzzer/FuzzerDriver.cpp
@@ -797,7 +797,7 @@
if (Flags.verbosity)
Printf("INFO: Seed: %u\n", Seed);
- if (Flags.collect_data_flow && !Flags.fork &&
+ if (Flags.collect_data_flow && Flags.data_flow_trace && !Flags.fork &&
!(Flags.merge || Flags.set_cover_merge)) {
if (RunIndividualFiles)
return CollectDataFlow(Flags.collect_data_flow, Flags.data_flow_trace,
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D145040.503232.patch
Type: text/x-patch
Size: 1226 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230308/0210b76f/attachment.bin>
More information about the cfe-commits
mailing list