This is an archive of the discontinued LLVM Phabricator instance.

[llvm-dwarfdump] Avoid possible div-by-zero in debug output
ClosedPublic

Authored by slydiman on Mar 9 2022, 4:47 AM.

Details

Summary

We didn't add a test because this bug only affected the debug output.

Diff Detail

Event Timeline

slydiman created this revision.Mar 9 2022, 4:47 AM
Herald added a project: Restricted Project. · View Herald Transcript
Herald added a subscriber: cmtice. · View Herald Transcript
slydiman requested review of this revision.Mar 9 2022, 4:47 AM
djtodoro accepted this revision.Mar 9 2022, 4:49 AM

Thanks.

This revision is now accepted and ready to land.Mar 9 2022, 4:49 AM
djtodoro added inline comments.Mar 9 2022, 4:50 AM
llvm/tools/llvm-dwarfdump/Statistics.cpp
1064

can we face the same here?

slydiman updated this revision to Diff 414080.Mar 9 2022, 5:42 AM
slydiman marked an inline comment as done.
slydiman added inline comments.
llvm/tools/llvm-dwarfdump/Statistics.cpp
1064

Probably yes, but we did not face it yet. I have updated the patch just to be sure.

djtodoro accepted this revision.Mar 9 2022, 5:57 AM

lgtm

slydiman closed this revision.Mar 9 2022, 6:33 AM