Skip to content

Commit

Permalink
Fix parallel SuperPMI pass-through logging (dotnet#94284)
Browse files Browse the repository at this point in the history
Need to output in a way that the message string isn't interpreted as a
C formatting string, with `%` replacements.
  • Loading branch information
BruceForstall authored Nov 2, 2023
1 parent 2406107 commit 98b7546
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/coreclr/tools/superpmi/superpmi/parallelsuperpmi.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ void ProcessChildStdErr(char* stderrFilename)
if (buff[buffLen - 1] == '\n')
buff[buffLen - 1] = 0;

LogPassThroughStderr(buff);
LogPassThroughStderr("%s", buff);
}

Cleanup:
Expand Down Expand Up @@ -234,7 +234,7 @@ void ProcessChildStdOut(const CommandLine::Options& o,
if (strncmp(buff, g_SuperPMIUsageFirstLine, strlen(g_SuperPMIUsageFirstLine)) == 0)
{
*usageError = true; // Signals that we had a SuperPMI command line usage error
LogPassThroughStdout(buff);
LogPassThroughStdout("%s", buff);
}
else if (strncmp(buff, g_AllFormatStringFixedPrefix, strlen(g_AllFormatStringFixedPrefix)) == 0)
{
Expand Down Expand Up @@ -272,7 +272,7 @@ void ProcessChildStdOut(const CommandLine::Options& o,
{
// Do output pass-through.
// Note that the same logging verbosity level is passed to the child processes.
LogPassThroughStdout(buff);
LogPassThroughStdout("%s", buff);
}
}

Expand Down

0 comments on commit 98b7546

Please sign in to comment.