[llvm] r279276 - Revert "[asan] Fix size of shadow incorrectly calculated in r279178"
Vitaly Buka via llvm-commits
llvm-commits at lists.llvm.org
Fri Aug 19 10:15:34 PDT 2016
Author: vitalybuka
Date: Fri Aug 19 12:15:33 2016
New Revision: 279276
URL: http://llvm.org/viewvc/llvm-project?rev=279276&view=rev
Log:
Revert "[asan] Fix size of shadow incorrectly calculated in r279178"
This reverts commit r279222.
Speculative revert in hope to fix asan crash on arm.
Modified:
llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=279276&r1=279275&r2=279276&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Fri Aug 19 12:15:33 2016
@@ -2237,8 +2237,10 @@ void FunctionStackPoisoner::poisonStack(
IRBuilder<> IRBPoison(ThenTerm);
if (StackMallocIdx <= 4) {
int ClassSize = kMinStackMallocSize << StackMallocIdx;
- ShadowBytesAfterReturn.resize(ClassSize >> Mapping.Scale,
- kAsanStackUseAfterReturnMagic);
+ if ((int)ShadowBytesAfterReturn.size() != ClassSize) {
+ ShadowBytesAfterReturn.resize(ClassSize,
+ kAsanStackUseAfterReturnMagic);
+ }
poisonRedZones(ShadowBytesAfterReturn, IRBPoison, ShadowBase, true);
Value *SavedFlagPtrPtr = IRBPoison.CreateAdd(
FakeStack,
Modified: llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll?rev=279276&r1=279275&r2=279276&view=diff
==============================================================================
--- llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll (original)
+++ llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll Fri Aug 19 12:15:33 2016
@@ -44,7 +44,6 @@ entry:
; CHECK-UAR: store i64 -723401728380766731
; CHECK-UAR: store i64 -723401728380766731
; CHECK-UAR: store i64 -723401728380766731
- ; CHECK-UAR-NOT: store i64
; CHECK-UAR: store i8 0
; CHECK-UAR-NOT: store
; CHECK-UAR: label
More information about the llvm-commits
mailing list