[PATCH] D75695: [StackProtector] Catch direct out-of-bounds when checking address-takenness
Eli Friedman via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 13 14:34:26 PDT 2020
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/StackProtector.cpp:209
+ unsigned TypeSize = DL.getIndexTypeSizeInBits(I->getType());
+ uint64_t ResultSize = DL.getTypeAllocSize(GEP->getResultElementType());
+ APInt Offset(TypeSize, ResultSize);
----------------
Can we just compute ResultSize as "AllocSize - Offset"? (That's obviously correct, and I'm not convinced that using the size of getResultElementType() does the right thing here.)
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75695/new/
https://reviews.llvm.org/D75695
More information about the llvm-commits
mailing list