This is an archive of the discontinued LLVM Phabricator instance.

[llvm-size] Fix hang on invalid short commandline option
ClosedPublic

Authored by gbreynoo on Jul 15 2022, 8:41 AM.

Details

Summary

When an invalid shot command line option was used (e.g. -v) llvm-size would hang. This change fixes this issue by bringing llvm-size in line with other llvm tools and exiting early when this error is output.

Diff Detail

Event Timeline

gbreynoo created this revision.Jul 15 2022, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 8:41 AM
gbreynoo requested review of this revision.Jul 15 2022, 8:41 AM
Herald added a project: Restricted Project. · View Herald TranscriptJul 15 2022, 8:41 AM

When an invalid shot command line option was used (e.g. -v) llvm-size would hang.

Thanks for catching the bug. llvm-size does not hang. It is waiting on input from stdin.

jhenderson accepted this revision.Jul 18 2022, 12:11 AM

In the commit message: "When an invalid short command" (typo: "shot" -> "short"). To address @MaskRay's comment, I'd change "hang" to "hang waiting for input".

This revision is now accepted and ready to land.Jul 18 2022, 12:11 AM
MaskRay accepted this revision.Jul 18 2022, 12:19 AM
This revision was landed with ongoing or failed builds.Jul 18 2022, 7:02 AM
This revision was automatically updated to reflect the committed changes.