oss-fuzz: debug code to output testcase in file code.cpp
This commit is contained in:
parent
3c1f6ae5c2
commit
548ddf815c
|
@ -30,8 +30,13 @@ public:
|
||||||
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataSize)
|
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t dataSize)
|
||||||
{
|
{
|
||||||
if (dataSize < 10000) {
|
if (dataSize < 10000) {
|
||||||
|
const std::string code = generateCode2(data, dataSize);
|
||||||
|
//std::ofstream fout("code.cpp");
|
||||||
|
//fout << code;
|
||||||
|
//fout.close();
|
||||||
|
|
||||||
CppcheckExecutor cppcheckExecutor;
|
CppcheckExecutor cppcheckExecutor;
|
||||||
cppcheckExecutor.run(generateCode2(data, dataSize));
|
cppcheckExecutor.run(code);
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue