<div dir="ltr">LGTM</div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 7, 2015 at 2:03 PM, Pete Cooper <span dir="ltr"><<a href="mailto:peter_cooper@apple.com" target="_blank">peter_cooper@apple.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thanks for taking this on.  I got stuck at the clang error it found.<br>
<br>
LGTM, as it looks like you’ve fixed it the way Alexey requested in phab.<br>
<br>
Thanks,<br>
Pete<br>
<div><div class="h5">> On Dec 7, 2015, at 1:28 PM, Justin Bogner <<a href="mailto:mail@justinbogner.com">mail@justinbogner.com</a>> wrote:<br>
><br>
> (resending to correct list)<br>
><br>
> Alexey Samsonov <<a href="mailto:vonosmas@gmail.com">vonosmas@gmail.com</a>> writes:<br>
>> ================<br>
>> Comment at: include/llvm/Support/Allocator.h:229<br>
>> @@ +228,3 @@<br>
>> +      // Similarly, tell ASan about this space.<br>
>> +#if LLVM_ADDRESS_SANITIZER_BUILD<br>
>> +      ASAN_UNPOISON_MEMORY_REGION(AlignedPtr, Size);<br>
>> ----------------<br>
>> kcc wrote:<br>
>>> I don't like so many ifdefs.<br>
>>> Maybe like this?<br>
>>><br>
>>> #if LLVM_ADDRESS_SANITIZER_BUILD<br>
>>> # include ...<br>
>>> #else<br>
>>>  #define ASAN_POISON_MEMORY_REGION(a,b)  /*empty*/<br>
>>> #endif<br>
>> In fact, it's worth defining this macro in llvm/Support/Compiler.h,<br>
>> similar to what we do for MSan interface function<br>
>> `__msan_allocated_memory`<br>
><br>
> I was trying this out to see if it would catch a bug I saw, and happened<br>
> to clean it up to be more like we do the msan annotations. Okay to<br>
> commit the attached version?<br>
><br>
</div></div>> <asan-bpa.patch><br>
<br>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div></div>
</div>