@@ -293,9 +293,12 @@ static int RunInMultipleProcesses(const std::vector<std::string> &Args,
293
293
std::vector<std::thread> V;
294
294
std::thread Pulse (PulseThread);
295
295
Pulse.detach ();
296
- for (unsigned i = 0 ; i < NumWorkers; i++)
297
- V.push_back (std::thread (WorkerThread, std::ref (Cmd), &Counter, NumJobs,
298
- &HasErrors));
296
+ V.resize (NumWorkers);
297
+ for (unsigned i = 0 ; i < NumWorkers; i++) {
298
+ V[i] = std::thread (WorkerThread, std::ref (Cmd), &Counter, NumJobs,
299
+ &HasErrors);
300
+ SetThreadName (V[i], " FuzzerWorker" );
301
+ }
299
302
for (auto &T : V)
300
303
T.join ();
301
304
return HasErrors ? 1 : 0 ;
@@ -463,7 +466,7 @@ int MinimizeCrashInput(const std::vector<std::string> &Args,
463
466
CurrentFilePath = Flags.exact_artifact_path ;
464
467
WriteToFile (U, CurrentFilePath);
465
468
}
466
- Printf (" CRASH_MIN: failed to minimize beyond %s (%d bytes), exiting\n " ,
469
+ Printf (" CRASH_MIN: failed to minimize beyond %s (%zu bytes), exiting\n " ,
467
470
CurrentFilePath.c_str (), U.size ());
468
471
break ;
469
472
}
@@ -501,7 +504,6 @@ int MinimizeCrashInputInternalStep(Fuzzer *F, InputCorpus *Corpus) {
501
504
F->MinimizeCrashLoop (U);
502
505
Printf (" INFO: Done MinimizeCrashInputInternalStep, no crashes found\n " );
503
506
exit (0 );
504
- return 0 ;
505
507
}
506
508
507
509
void Merge (Fuzzer *F, FuzzingOptions &Options,
@@ -535,7 +537,7 @@ void Merge(Fuzzer *F, FuzzingOptions &Options,
535
537
536
538
int AnalyzeDictionary (Fuzzer *F, const std::vector<Unit> &Dict,
537
539
UnitVector &Corpus) {
538
- Printf (" Started dictionary minimization (up to %d tests)\n " ,
540
+ Printf (" Started dictionary minimization (up to %zu tests)\n " ,
539
541
Dict.size () * Corpus.size () * 2 );
540
542
541
543
// Scores and usage count for each dictionary unit.
@@ -779,7 +781,7 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) {
779
781
if (!Options.FocusFunction .empty ())
780
782
Options.Entropic = false ; // FocusFunction overrides entropic scheduling.
781
783
if (Options.Entropic )
782
- Printf (" INFO: Running with entropic power schedule (0x%X , %d ).\n " ,
784
+ Printf (" INFO: Running with entropic power schedule (0x%zX , %zu ).\n " ,
783
785
Options.EntropicFeatureFrequencyThreshold ,
784
786
Options.EntropicNumberOfRarestFeatures );
785
787
struct EntropicOptions Entropic;
@@ -797,7 +799,7 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) {
797
799
if (Flags.verbosity )
798
800
Printf (" INFO: Seed: %u\n " , Seed);
799
801
800
- if (Flags.collect_data_flow && !Flags.fork &&
802
+ if (Flags.collect_data_flow && Flags. data_flow_trace && !Flags.fork &&
801
803
!(Flags.merge || Flags.set_cover_merge )) {
802
804
if (RunIndividualFiles)
803
805
return CollectDataFlow (Flags.collect_data_flow , Flags.data_flow_trace ,
@@ -860,7 +862,7 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) {
860
862
RunOneTest (F, Path.c_str (), Options.MaxLen );
861
863
auto StopTime = system_clock::now ();
862
864
auto MS = duration_cast<milliseconds>(StopTime - StartTime).count ();
863
- Printf (" Executed %s in %zd ms\n " , Path.c_str (), (long )MS);
865
+ Printf (" Executed %s in %ld ms\n " , Path.c_str (), (long )MS);
864
866
}
865
867
Printf (" ***\n "
866
868
" *** NOTE: fuzzing was not performed, you have only\n "
0 commit comments