[llvm-commits] [cfe-commits] [PATCH] AddressSanitizer Initialization Order Checking

Reid Watson reidw at google.com
Mon Aug 20 13:52:38 PDT 2012


OK, I re-reviewed what was contained in the patches.
I had a few non-reviewed experiments accidentally included in the
previous patches.
I've attached the correct versions, containing only the properly
reviewed changes.
Sincere apologies for the trouble!

On Mon, Aug 20, 2012 at 1:14 PM, Reid Watson <reidw at google.com> wrote:
> Sorry, minor problem with the compiler-rt patch.
>
> Please commit the attached version of the compiler-rt patch instead of
> the previous one.
>
> On Mon, Aug 20, 2012 at 10:57 AM, Reid Watson <reidw at google.com> wrote:
>> I've incorporated all the review comments in the attached patches.
>> The tool is off by default, and enabled by adding -mllvm
>> -asan-initialization-order to clang.
>>
>> I don't have commit access, so I'd appreciate it if someone could
>> commit these for me.
>>
>> All the best,
>> Reid
>>
>> On Thu, Aug 16, 2012 at 6:09 PM, Reid Watson <reidw at google.com> wrote:
>>> I'll add in the prefix before the final version for commit.
>>>
>>> The goal is to detect globals with dynamic initialization per the C++
>>> standard, so that ASan knows which globals can only be accessed during
>>> .  It's valid to access a statically initialized global inside of an
>>> initializer, even if that global resides in a different TU.  Thus,
>>> LLVM/ASan need to be able to distinguish between
>>> dynamically/statically initialized globals.  I'm not certain this is
>>> optimal, but there haven't been any unexpected false positives with
>>> it.  We may be missing a few case, and the optimizer can certainly end
>>> up leaving us with false negatives, but those are much better than
>>> false positives.
>>>
>>> On Thu, Aug 16, 2012 at 5:27 PM, Eric Christopher <echristo at apple.com> wrote:
>>>>
>>>>
>>>> On Aug 16, 2012, at 1:05 AM, Kostya Serebryany <kcc at google.com> wrote:
>>>>
>>>>> +llvm-commits
>>>>>
>>>>> Reid,
>>>>>
>>>>> The LLVM and compiler-rt patches look good.
>>>>> Please fix the remaining small issues (see my code review comments) and commit.
>>>>> Hold on with the output tests for a bit since Alexey Samsonov is migrating them to cmake (please coordinate with him and commit as a separate patch).
>>>>>
>>>>> The stress test should contain X files, Y linker initialized globals and Z dynamically initialized globals.
>>>>> Such test only makes sense where all 3 numbers are large.
>>>>> I guess you can commit a single .sh script into compiler-rt/lib/asan/scripts
>>>>
>>>> The metadata should at least be prefixed with something like llvm.asan.<whatever> instead of just the name. That way it's more identifiable.
>>>>
>>>> What's the idea behind the metadata use anyhow?
>>>>
>>>> -eric
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asan-initialization-order-clang.patch
Type: application/octet-stream
Size: 995 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120820/db20c1b2/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asan-initialization-order-compilerrt.patch
Type: application/octet-stream
Size: 15521 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120820/db20c1b2/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: asan-initialization-order-llvm.patch
Type: application/octet-stream
Size: 18371 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20120820/db20c1b2/attachment-0002.obj>


More information about the llvm-commits mailing list