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

Reid Watson reidw at google.com
Thu Aug 16 18:09:54 PDT 2012


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



More information about the llvm-commits mailing list