From 1ac6bd0c71bb88f77624bebca4f678296c97396a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jaroslav=20Loba=C4=8Devski?= Date: Thu, 1 May 2025 08:15:14 +0200 Subject: [PATCH] Guard both Printf in WorkerThread with mutex The first Printf in WorkerThread wasn't guarded with mutex --- compiler-rt/lib/fuzzer/FuzzerDriver.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp index 3771abf5f532d..bf60606594693 100644 --- a/compiler-rt/lib/fuzzer/FuzzerDriver.cpp +++ b/compiler-rt/lib/fuzzer/FuzzerDriver.cpp @@ -239,6 +239,7 @@ static void WorkerThread(const Command &BaseCmd, std::atomic *Counter, Cmd.combineOutAndErr(); if (Flags.verbosity) { std::string CommandLine = Cmd.toString(); + std::lock_guard Lock(Mu); Printf("%s\n", CommandLine.c_str()); } int ExitCode = ExecuteCommand(Cmd);