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

Eric Christopher echristo at apple.com
Tue Aug 21 08:07:19 PDT 2012


On 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.

Sounds ok, I was mostly worried about having yet another metadata consumer
in llvm, but having looked at it it's not too bad and probably better than
trying to match back globals to initializers.

-eric



More information about the llvm-commits mailing list