This is an archive of the discontinued LLVM Phabricator instance.

[llvm-cov] Use uint64_t to avoid overflow in addition
ClosedPublic

Authored by Flightor on Aug 10 2023, 5:55 AM.

Diff Detail

Event Timeline

Flightor created this revision.Aug 10 2023, 5:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2023, 5:55 AM
Flightor requested review of this revision.Aug 10 2023, 5:55 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 10 2023, 5:55 AM
alanphipps accepted this revision.Aug 10 2023, 7:50 AM

LGTM thanks

llvm/tools/llvm-cov/SourceCoverageViewText.cpp
235–237

Thanks for catching this. I believe CoverageSummaryInfo.cpp uses size_t to add the counters, but I am OK with using uint64_t for the source coverage views.

This revision is now accepted and ready to land.Aug 10 2023, 7:50 AM
This revision was automatically updated to reflect the committed changes.