@@ -293,9 +293,12 @@ static int RunInMultipleProcesses(const std::vector<std::string> &Args,
293293 std::vector<std::thread> V;
294294 std::thread Pulse (PulseThread);
295295 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+ }
299302 for (auto &T : V)
300303 T.join ();
301304 return HasErrors ? 1 : 0 ;
@@ -463,7 +466,7 @@ int MinimizeCrashInput(const std::vector<std::string> &Args,
463466 CurrentFilePath = Flags.exact_artifact_path ;
464467 WriteToFile (U, CurrentFilePath);
465468 }
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 " ,
467470 CurrentFilePath.c_str (), U.size ());
468471 break ;
469472 }
@@ -501,7 +504,6 @@ int MinimizeCrashInputInternalStep(Fuzzer *F, InputCorpus *Corpus) {
501504 F->MinimizeCrashLoop (U);
502505 Printf (" INFO: Done MinimizeCrashInputInternalStep, no crashes found\n " );
503506 exit (0 );
504- return 0 ;
505507}
506508
507509void Merge (Fuzzer *F, FuzzingOptions &Options,
@@ -535,7 +537,7 @@ void Merge(Fuzzer *F, FuzzingOptions &Options,
535537
536538int AnalyzeDictionary (Fuzzer *F, const std::vector<Unit> &Dict,
537539 UnitVector &Corpus) {
538- Printf (" Started dictionary minimization (up to %d tests)\n " ,
540+ Printf (" Started dictionary minimization (up to %zu tests)\n " ,
539541 Dict.size () * Corpus.size () * 2 );
540542
541543 // Scores and usage count for each dictionary unit.
@@ -779,7 +781,7 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) {
779781 if (!Options.FocusFunction .empty ())
780782 Options.Entropic = false ; // FocusFunction overrides entropic scheduling.
781783 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 " ,
783785 Options.EntropicFeatureFrequencyThreshold ,
784786 Options.EntropicNumberOfRarestFeatures );
785787 struct EntropicOptions Entropic;
@@ -797,7 +799,7 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) {
797799 if (Flags.verbosity )
798800 Printf (" INFO: Seed: %u\n " , Seed);
799801
800- if (Flags.collect_data_flow && !Flags.fork &&
802+ if (Flags.collect_data_flow && Flags. data_flow_trace && !Flags.fork &&
801803 !(Flags.merge || Flags.set_cover_merge )) {
802804 if (RunIndividualFiles)
803805 return CollectDataFlow (Flags.collect_data_flow , Flags.data_flow_trace ,
@@ -860,7 +862,7 @@ int FuzzerDriver(int *argc, char ***argv, UserCallback Callback) {
860862 RunOneTest (F, Path.c_str (), Options.MaxLen );
861863 auto StopTime = system_clock::now ();
862864 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);
864866 }
865867 Printf (" ***\n "
866868 " *** NOTE: fuzzing was not performed, you have only\n "
0 commit comments