| 940 | } |
| 941 | |
| 942 | void Fuzzer::MinimizeCrashLoop(const Unit &U) { |
| 943 | if (U.size() <= 1) |
| 944 | return; |
| 945 | while (!TimedOut() && TotalNumberOfRuns < Options.MaxNumberOfRuns) { |
| 946 | MD.StartMutationSequence(); |
| 947 | memcpy(CurrentUnitData, U.data(), U.size()); |
| 948 | for (int i = 0; i < Options.MutateDepth; i++) { |
| 949 | size_t NewSize = MD.Mutate(CurrentUnitData, U.size(), MaxMutationLen); |
| 950 | assert(NewSize > 0 && NewSize <= MaxMutationLen); |
| 951 | ExecuteCallback(CurrentUnitData, NewSize); |
| 952 | PrintPulseAndReportSlowInput(CurrentUnitData, NewSize); |
| 953 | TryDetectingAMemoryLeak(CurrentUnitData, NewSize, |
| 954 | /*DuringInitialCorpusExecution*/ false); |
| 955 | } |
| 956 | } |
| 957 | } |
| 958 | |
| 959 | } // namespace fuzzer |
| 960 |
no test coverage detected