Skip to content

Commit

Permalink
Increase kMaxInitializeDepth and remove annoying assert
Browse files Browse the repository at this point in the history
  • Loading branch information
vitalybuka committed Aug 22, 2017
1 parent 17789d1 commit 82316df
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/mutator.cc
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ using std::placeholders::_1;

namespace {

const size_t kMaxInitializeDepth = 32;
const size_t kMaxInitializeDepth = 100;
const uint64_t kDefaultMutateWeight = 1000000;

enum class Mutation {
Expand Down Expand Up @@ -583,9 +583,6 @@ void Mutator::CrossOverImpl(const protobuf::Message& message1,

void Mutator::InitializeMessage(Message* message, size_t max_depth) {
assert(keep_initialized_);
// It's pointless but possible to have infinite recursion of required
// messages.
assert(max_depth);
const Descriptor* descriptor = message->GetDescriptor();
const Reflection* reflection = message->GetReflection();
for (int i = 0; i < descriptor->field_count(); ++i) {
Expand Down

0 comments on commit 82316df

Please sign in to comment.