<div dir="ltr">reverted with r279276<br></div><br><div class="gmail_quote"><div dir="ltr">On Fri, Aug 19, 2016 at 10:23 AM Vitaly Buka via llvm-commits <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: vitalybuka<br>
Date: Fri Aug 19 12:15:33 2016<br>
New Revision: 279276<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=279276&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=279276&view=rev</a><br>
Log:<br>
Revert "[asan] Fix size of shadow incorrectly calculated in r279178"<br>
<br>
This reverts commit r279222.<br>
<br>
Speculative revert in hope to fix asan crash on arm.<br>
<br>
Modified:<br>
    llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp<br>
    llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll<br>
<br>
Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=279276&r1=279275&r2=279276&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=279276&r1=279275&r2=279276&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp (original)<br>
+++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Fri Aug 19 12:15:33 2016<br>
@@ -2237,8 +2237,10 @@ void FunctionStackPoisoner::poisonStack(<br>
       IRBuilder<> IRBPoison(ThenTerm);<br>
       if (StackMallocIdx <= 4) {<br>
         int ClassSize = kMinStackMallocSize << StackMallocIdx;<br>
-        ShadowBytesAfterReturn.resize(ClassSize >> Mapping.Scale,<br>
-                                      kAsanStackUseAfterReturnMagic);<br>
+        if ((int)ShadowBytesAfterReturn.size() != ClassSize) {<br>
+          ShadowBytesAfterReturn.resize(ClassSize,<br>
+                                        kAsanStackUseAfterReturnMagic);<br>
+        }<br>
         poisonRedZones(ShadowBytesAfterReturn, IRBPoison, ShadowBase, true);<br>
         Value *SavedFlagPtrPtr = IRBPoison.CreateAdd(<br>
             FakeStack,<br>
<br>
Modified: llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll?rev=279276&r1=279275&r2=279276&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll?rev=279276&r1=279275&r2=279276&view=diff</a><br>
==============================================================================<br>
--- llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll (original)<br>
+++ llvm/trunk/test/Instrumentation/AddressSanitizer/stack-poisoning.ll Fri Aug 19 12:15:33 2016<br>
@@ -44,7 +44,6 @@ entry:<br>
   ; CHECK-UAR: store i64 -723401728380766731<br>
   ; CHECK-UAR: store i64 -723401728380766731<br>
   ; CHECK-UAR: store i64 -723401728380766731<br>
-  ; CHECK-UAR-NOT: store i64<br>
   ; CHECK-UAR: store i8 0<br>
   ; CHECK-UAR-NOT: store<br>
   ; CHECK-UAR: label<br>
<br>
<br>
_______________________________________________<br>
llvm-commits mailing list<br>
<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
</blockquote></div>