No public description
PiperOrigin-RevId: 723328993
diff --git a/centipede/centipede_test.cc b/centipede/centipede_test.cc
index c0a4882..7e5696a 100644
--- a/centipede/centipede_test.cc
+++ b/centipede/centipede_test.cc
@@ -589,6 +589,7 @@
env.symbolizer_path = GetLLVMSymbolizerPath();
env.objdump_path = GetObjDumpPath();
env.log_level = 0;
+ env.populate_binary_info = true;
env.function_filter = function_filter;
FunctionFilterMock mock(env);
MockFactory factory(mock);
diff --git a/centipede/environment.h b/centipede/environment.h
index ab8ac49..2c062ee 100644
--- a/centipede/environment.h
+++ b/centipede/environment.h
@@ -114,7 +114,7 @@
#endif
bool dry_run = false;
bool save_binary_info = false;
- bool populate_binary_info = true;
+ bool populate_binary_info = false;
#ifdef CENTIPEDE_DISABLE_RIEGELI
bool riegeli = false;
#else
diff --git a/centipede/environment_flags.cc b/centipede/environment_flags.cc
index 83a165a..9423d54 100644
--- a/centipede/environment_flags.cc
+++ b/centipede/environment_flags.cc
@@ -395,11 +395,12 @@
ABSL_FLAG(bool, save_binary_info, Environment::Default().save_binary_info,
"Save the BinaryInfo from the fuzzing run within the working "
"directory.");
-ABSL_FLAG(bool, populate_binary_info,
- Environment::Default().populate_binary_info,
- "Get binary info from a coverage instrumented binary. This should "
- "only be turned off when coverage is not based on instrumenting some "
- "binary.");
+ABSL_FLAG(
+ bool, populate_binary_info, Environment::Default().populate_binary_info,
+ "If set, get binary info from a coverage-instrumented binary specified in "
+ "--coverage_binary, or --binary in case the former is unset. This is "
+ "needed for --analyze, --function_filter, --log_features_shards, and "
+ "--use_pcpair_features.");
#ifndef CENTIPEDE_DISABLE_RIEGELI
ABSL_FLAG(bool, riegeli, Environment::Default().riegeli,
"Use Riegeli file format (instead of the legacy bespoke encoding) "
diff --git a/centipede/testing/centipede_main_test.sh b/centipede/testing/centipede_main_test.sh
index 80478a7..60b3689 100755
--- a/centipede/testing/centipede_main_test.sh
+++ b/centipede/testing/centipede_main_test.sh
@@ -68,7 +68,7 @@
echo "============ ${FUNC}: run for the first time, with empty seed corpus, with feature logging"
test_fuzz --log_features_shards=1 --workdir="${WD}" --seed=1 --num_runs=1000 \
- --symbolizer_path="${LLVM_SYMBOLIZER}" | tee "${LOG}"
+ --populate_binary_info=true --symbolizer_path="${LLVM_SYMBOLIZER}" | tee "${LOG}"
centipede::assert_regex_in_file 'Custom mutator detected: will use it' "${LOG}"
# Note: the test assumes LLVMFuzzerTestOneInput is defined on a specific line.
centipede::assert_regex_in_file "FUNC: LLVMFuzzerTestOneInput .*testing/test_fuzz_target.cc:71" "${LOG}"
@@ -81,7 +81,8 @@
# TODO(b/282845630): Passing `--num_runs=1` only to trigger telemetry dumping.
# Change to `--num_runs=0` after the bug is fixed.
test_fuzz --log_features_shards=1 --workdir="${WD}" --seed=1 --num_runs=1 \
- --telemetry_frequency=1 --symbolizer_path="${LLVM_SYMBOLIZER}" 2>&1 \
+ --telemetry_frequency=1 --populate_binary_info=true \
+ --symbolizer_path="${LLVM_SYMBOLIZER}" 2>&1 \
| tee -a "${LOG}"
centipede::assert_regex_in_file "FUNC: SingleEdgeFunc" "${LOG}"
centipede::assert_regex_in_file "FUNC: MultiEdgeFunc" "${LOG}"
@@ -98,7 +99,7 @@
echo "============ ${FUNC}: run w/o the symbolizer, everything else should still work."
centipede::ensure_empty_dir "${WD}"
test_fuzz --workdir="${WD}" --seed=1 --num_runs=1000 \
- --symbolizer_path=/dev/null | tee "${LOG}"
+ --populate_binary_info=true --symbolizer_path=/dev/null | tee "${LOG}"
centipede::assert_regex_in_file "Symbolizer unspecified: debug symbols will not be used" "${LOG}"
centipede::assert_regex_in_file "end-fuzz:" "${LOG}"
}
@@ -167,12 +168,12 @@
echo "============ ${FUNC}: fuzz with --use_pcpair_features"
test_fuzz --workdir="${WD}" --use_pcpair_features --num_runs=10000 \
- --symbolizer_path="${LLVM_SYMBOLIZER}" | tee "${LOG}"
+ --populate_binary_info=true --symbolizer_path="${LLVM_SYMBOLIZER}" | tee "${LOG}"
centipede::assert_regex_in_file "end-fuzz.*pair: [^0]" "${LOG}"
echo "============ ${FUNC}: fuzz with --use_pcpair_features w/o symbolizer"
test_fuzz --workdir="${WD}" --use_pcpair_features --num_runs=10000 \
- --symbolizer_path=/dev/null | tee "${LOG}"
+ --populate_binary_info=true --symbolizer_path=/dev/null | tee "${LOG}"
centipede::assert_regex_in_file "end-fuzz.*pair: [^0]" "${LOG}"
}