Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove CHECKs for non-empty coverage binary name and hash. #1244

Merged
merged 1 commit into from
Jul 9, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions centipede/seed_corpus_maker_lib.cc
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,9 @@ void SampleSeedCorpusElementsFromSource( //
std::string_view coverage_binary_name, //
std::string_view coverage_binary_hash, //
InputAndFeaturesVec& elements) {
CHECK_EQ(coverage_binary_name.empty(), coverage_binary_hash.empty())
<< "Binary name and hash should both be either provided or empty";

RPROF_THIS_FUNCTION_WITH_TIMELAPSE( //
/*enable=*/ABSL_VLOG_IS_ON(1), //
/*timelapse_interval=*/absl::Seconds(ABSL_VLOG_IS_ON(2) ? 10 : 60), //
Expand Down Expand Up @@ -326,9 +329,10 @@ void WriteSeedCorpusElementsToDestination( //
std::string_view coverage_binary_name, //
std::string_view coverage_binary_hash, //
const SeedCorpusDestination& destination) {
CHECK_EQ(coverage_binary_name.empty(), coverage_binary_hash.empty())
<< "Binary name and hash should both be either provided or empty";

CHECK(!elements.empty());
CHECK(!coverage_binary_name.empty());
CHECK(!coverage_binary_hash.empty());
CHECK(!destination.dir_path().empty());

RPROF_THIS_FUNCTION_WITH_TIMELAPSE( //
Expand Down