[llvm] r175442 - [asan] revert r175266 as it breaks code with packed structures. supporting long double will require a more general solution
Kostya Serebryany
kcc at google.com
Mon Feb 18 21:03:07 PST 2013
On Tue, Feb 19, 2013 at 3:15 AM, Chandler Carruth <chandlerc at google.com>wrote:
> On Mon, Feb 18, 2013 at 5:47 AM, Kostya Serebryany <kcc at google.com> wrote:
>
>> Author: kcc
>> Date: Mon Feb 18 07:47:02 2013
>> New Revision: 175442
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=175442&view=rev
>> Log:
>> [asan] revert r175266 as it breaks code with packed structures.
>> supporting long double will require a more general solution
>>
>
> Thanks for tracking this down!
>
that was samsonov@ (kudos!)
>
> Can you add a simple regression test for the packed structs? (Or maybe you
> did and I just missed the commit?)
>
There is a test for long doubles which tests for the same thing.
I am planing to actually fix both long doubles and packed structures (have
a patch already) and add positive tests.
--kcc
>
>
>>
>> Modified:
>> llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
>> llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll
>>
>> Modified: llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp?rev=175442&r1=175441&r2=175442&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp
>> (original)
>> +++ llvm/trunk/lib/Transforms/Instrumentation/AddressSanitizer.cpp Mon
>> Feb 18 07:47:02 2013
>> @@ -639,7 +639,7 @@ void AddressSanitizer::instrumentMop(Ins
>> Type *OrigTy = cast<PointerType>(OrigPtrTy)->getElementType();
>>
>> assert(OrigTy->isSized());
>> - uint32_t TypeSize = TD->getTypeAllocSizeInBits(OrigTy);
>> + uint32_t TypeSize = TD->getTypeStoreSizeInBits(OrigTy);
>>
>> if (TypeSize != 8 && TypeSize != 16 &&
>> TypeSize != 32 && TypeSize != 64 && TypeSize != 128) {
>>
>> Modified: llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll
>> URL:
>> http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll?rev=175442&r1=175441&r2=175442&view=diff
>>
>> ==============================================================================
>> --- llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll (original)
>> +++ llvm/trunk/test/Instrumentation/AddressSanitizer/basic.ll Mon Feb 18
>> 07:47:02 2013
>> @@ -96,5 +96,5 @@ entry:
>> }
>>
>> ; CHECK: LongDoubleTest
>> -; CHECK: __asan_report_store16
>> +; CHECK-NOT: __asan_report_store16
>> ; CHECK: ret void
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130219/45c9dee5/attachment.html>
More information about the llvm-commits
mailing list