VerboseGC Initialized Stanza Print Fix #5806
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Using
printf
methods to write to files (e.gomrfile_printf
&omrfilestream_printf
) is problematic when the output buffer contains a string with specifier characters (e.g %s). In such a case, the format specifiers are intended to be outputted raw to the file rather than evaluated/expanded.printf
will treat the string as a format string and attempt to evaluate the specifiers (and crash) whereas the buffer must be printed raw. Currently,printf
methods are used when outputting verbose initialized block (string).When outputting the init block, use the verbose writer's
outputString
method rather than usingomrfilestream_printf
for FileLoggingSynchronous Writeromrfile_printf
for FileLoggingBuffered WriteroutputString
will useomrfile_write_text
and just print the raw characters.Signed-off-by: Salman Rana salman.rana@ibm.com