[llvm] r251961 - [libFuzzer] make -test_single_input more reliable: make sure the input's size is equal to it's capacity
Kostya Serebryany via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 3 10:57:26 PST 2015
Author: kcc
Date: Tue Nov 3 12:57:25 2015
New Revision: 251961
URL: http://llvm.org/viewvc/llvm-project?rev=251961&view=rev
Log:
[libFuzzer] make -test_single_input more reliable: make sure the input's size is equal to it's capacity
Modified:
llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
Modified: llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp?rev=251961&r1=251960&r2=251961&view=diff
==============================================================================
--- llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp (original)
+++ llvm/trunk/lib/Fuzzer/FuzzerDriver.cpp Tue Nov 3 12:57:25 2015
@@ -184,7 +184,9 @@ static int RunInMultipleProcesses(const
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;
}
More information about the llvm-commits
mailing list