[llvm] r282022 - [CodeGen] stop short-circuiting the SSP code for sspstrong.
George Burgess IV via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 20 14:30:01 PDT 2016
Author: gbiv
Date: Tue Sep 20 16:30:01 2016
New Revision: 282022
URL: http://llvm.org/viewvc/llvm-project?rev=282022&view=rev
Log:
[CodeGen] stop short-circuiting the SSP code for sspstrong.
This check caused us to skip adding layout information for calls to
alloca in sspreq/sspstrong mode. We check properly for sspstrong later
on (and add the correct layout info when doing so), so removing this
shouldn't hurt.
No test is included, since testing this using lit seems to require
checking for exact offsets in asm, which is something that the lit tests
for this avoid. If someone cares deeply, I'm happy to write a unittest
or something to cover this, but that feels like overkill.
Patch by Daniel Micay.
Differential Revision: https://reviews.llvm.org/D22714
Modified:
llvm/trunk/lib/CodeGen/StackProtector.cpp
Modified: llvm/trunk/lib/CodeGen/StackProtector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/StackProtector.cpp?rev=282022&r1=282021&r2=282022&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/StackProtector.cpp (original)
+++ llvm/trunk/lib/CodeGen/StackProtector.cpp Tue Sep 20 16:30:01 2016
@@ -236,11 +236,6 @@ bool StackProtector::RequiresStackProtec
for (const Instruction &I : BB) {
if (const AllocaInst *AI = dyn_cast<AllocaInst>(&I)) {
if (AI->isArrayAllocation()) {
- // SSP-Strong: Enable protectors for any call to alloca, regardless
- // of size.
- if (Strong)
- return true;
-
if (const auto *CI = dyn_cast<ConstantInt>(AI->getArraySize())) {
if (CI->getLimitedValue(SSPBufferSize) >= SSPBufferSize) {
// A call to alloca with size >= SSPBufferSize requires
More information about the llvm-commits
mailing list