[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
Thu Mar 5 10:57:49 PST 2020
efriedma added inline comments.
================
Comment at: llvm/lib/CodeGen/StackProtector.cpp:202
+ APInt MaxOffset(TypeSize, DL.getTypeStoreSize(
+ AI->getType()->getPointerElementType()));
+ if (!GEP->accumulateConstantOffset(DL, Offset) || Offset.uge(MaxOffset))
----------------
I think AllocaInst has a getAllocatedType, or something like that?
Should use getTypeAllocSize, since that's what actually determines the number of bytes allocated.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D75695/new/
https://reviews.llvm.org/D75695
More information about the llvm-commits
mailing list