[PATCH] D144565: dwp check overflow
Qing Shan Zhang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 22 18:56:53 PST 2023
steven.zhang added inline comments.
================
Comment at: llvm/tools/llvm-dwp/llvm-dwp.cpp:465
CurEntry.Contributions[Index].Offset = ContributionOffsets[Index];
- ContributionOffsets[Index] +=
- (CurEntry.Contributions[Index].Length = Contents.size());
+ APInt Offset{32, ContributionOffsets[Index], false};
+ APInt NewLength{
----------------
please don't hard code the 32 here. Maybe, you can use sizeof(ContributionOffsets[Index]) or other api that APInt have.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D144565/new/
https://reviews.llvm.org/D144565
More information about the llvm-commits
mailing list