This is an archive of the discontinued LLVM Phabricator instance.

[libunwind] Fflush stderr after each log message
ClosedPublic

Authored by mstorsjo on Apr 5 2023, 9:42 AM.

Details

Reviewers
compnerd
Group Reviewers
Restricted Project
Commits
rGa33d5a9939aa: [libunwind] Fflush stderr after each log message
Summary

In most configs, stderr is line buffered by default, but in some
cases on Windows (running in git bash, or running in Wine) stderr
can end up fully buffered.

See 2ec75a0869ab01fa9caf310e8a31eb7716182d30 for a similar change
for the output from lit itself.

This has no effect on libunwind when the log messages aren't enabled
via the environment variables.

Diff Detail

Event Timeline

mstorsjo created this revision.Apr 5 2023, 9:42 AM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptApr 5 2023, 9:42 AM
Herald added a reviewer: Restricted Project. · View Herald Transcript
mstorsjo requested review of this revision.Apr 5 2023, 9:42 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 5 2023, 9:42 AM
compnerd accepted this revision.Apr 5 2023, 3:50 PM
compnerd added a subscriber: compnerd.

If you're enabling libunwinding logging, you are already in a bad place. The additional flush isn't going to hurt you any further.

This revision is now accepted and ready to land.Apr 5 2023, 3:50 PM

If you're enabling libunwinding logging, you are already in a bad place. The additional flush isn't going to hurt you any further.

Yep, and stderr is normally line buffered anyway so there shouldn't really be any difference for other users anyway.

This revision was landed with ongoing or failed builds.Apr 6 2023, 1:09 AM
This revision was automatically updated to reflect the committed changes.