Skip to content

Commit

Permalink
[libFuzzer] make -test_single_input more reliable: make sure the inpu…
Browse files Browse the repository at this point in the history
…t's size is equal to it's capacity

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251961 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
kcc committed Nov 3, 2015
1 parent 49d6913 commit af639be
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/Fuzzer/FuzzerDriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,9 @@ static int RunInMultipleProcesses(const std::vector<std::string> &Args,

int RunOneTest(Fuzzer *F, const char *InputFilePath) {
Unit U = FileToVector(InputFilePath);
F->ExecuteCallback(U);
Unit PreciseSizedU(U);
assert(PreciseSizedU.size() == PreciseSizedU.capacity());
F->ExecuteCallback(PreciseSizedU);
return 0;
}

Expand Down

0 comments on commit af639be

Please sign in to comment.