[PATCH] Don't localize globals that may serve as leak checker roots.

Nick Lewycky nicholas at mxc.ca
Wed Sep 25 12:08:03 PDT 2013

Rafael EspĂ­ndola wrote:
> On 25 September 2013 13:31, Reid Kleckner<rnk at google.com>  wrote:
>> I missed any earlier discussion about this.  Don't we want to keep this
>> optimization, even if it's a real corner case that fires once in a blue
>> moon?  isLeakCheckerRoot() doesn't check any flags to see if any of the
>> sanitizers are on.
> I agree. Wouldn't it be better for clang to attach metadata to a
> global variable to say it is a GC root? That way the optimization is
> only disabled when using a sanitizer.

Huh? Isn't it just as broken with valgrind's leak checker? If not, why 
isn't it?


More information about the llvm-commits mailing list