git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249808
91177308-0d34-0410-b5e6-
96231b3b80d8
void Fuzzer::DeathCallback() {
Printf("DEATH:\n");
void Fuzzer::DeathCallback() {
Printf("DEATH:\n");
- Print(CurrentUnit, "\n");
- PrintUnitInASCIIOrTokens(CurrentUnit, "\n");
+ if (CurrentUnit.size() <= kMaxUnitSizeToPrint) {
+ Print(CurrentUnit, "\n");
+ PrintUnitInASCIIOrTokens(CurrentUnit, "\n");
+ }
WriteUnitToFileWithPrefix(CurrentUnit, "crash-");
}
WriteUnitToFileWithPrefix(CurrentUnit, "crash-");
}
Printf("ALARM: working on the last Unit for %zd seconds\n", Seconds);
Printf(" and the timeout value is %d (use -timeout=N to change)\n",
Options.UnitTimeoutSec);
Printf("ALARM: working on the last Unit for %zd seconds\n", Seconds);
Printf(" and the timeout value is %d (use -timeout=N to change)\n",
Options.UnitTimeoutSec);
- if (CurrentUnit.size() <= kMaxUnitSizeToPrint)
+ if (CurrentUnit.size() <= kMaxUnitSizeToPrint) {
Print(CurrentUnit, "\n");
Print(CurrentUnit, "\n");
- PrintUnitInASCIIOrTokens(CurrentUnit, "\n");
+ PrintUnitInASCIIOrTokens(CurrentUnit, "\n");
+ }
WriteUnitToFileWithPrefix(CurrentUnit, "timeout-");
exit(1);
}
WriteUnitToFileWithPrefix(CurrentUnit, "timeout-");
exit(1);
}
TimeOfUnit >= Options.ReportSlowUnits) {
TimeOfLongestUnitInSeconds = TimeOfUnit;
Printf("Slowest unit: %zd s:\n", TimeOfLongestUnitInSeconds);
TimeOfUnit >= Options.ReportSlowUnits) {
TimeOfLongestUnitInSeconds = TimeOfUnit;
Printf("Slowest unit: %zd s:\n", TimeOfLongestUnitInSeconds);
- if (U.size() <= kMaxUnitSizeToPrint)
- Print(U, "\n");
WriteUnitToFileWithPrefix(U, "slow-unit-");
}
return Res;
WriteUnitToFileWithPrefix(U, "slow-unit-");
}
return Res;