This is an archive of the discontinued LLVM Phabricator instance.

[clang][dataflow] Avoid MaxIterations overflow
ClosedPublic

Authored by jkorous on Jan 21 2022, 5:21 PM.

Details

Summary

In case unsigned is only 16 bits wide MaxIterations wraps around and ends up being zero.

Diff Detail

Event Timeline

jkorous created this revision.Jan 21 2022, 5:21 PM
jkorous requested review of this revision.Jan 21 2022, 5:21 PM
sgatev accepted this revision.Jan 23 2022, 10:36 AM

Thanks!

This revision is now accepted and ready to land.Jan 23 2022, 10:36 AM
tschuett added inline comments.
clang/lib/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.cpp
213–214

I would prefer something like uint32_t. long is scary stuff.

This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptJan 24 2022, 3:59 PM
Herald added a subscriber: cfe-commits. · View Herald Transcript