<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Jul 10, 2014 at 1:27 PM, Ehsan Akhgari <span dir="ltr"><<a href="mailto:ehsan.akhgari@gmail.com" target="_blank">ehsan.akhgari@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr"><div class="">On Thu, Jul 10, 2014 at 4:20 PM, Reid Kleckner <span dir="ltr"><<a href="mailto:rnk@google.com" target="_blank">rnk@google.com</a>></span> wrote:<br>
</div><div class="gmail_extra"><div class="gmail_quote"><div class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex">


<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><div>On Thu, Jul 10, 2014 at 7:04 AM, Ehsan Akhgari <span dir="ltr"><<a href="mailto:ehsan.akhgari@gmail.com" target="_blank">ehsan.akhgari@gmail.com</a>></span> wrote:<br>



<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hmm, thinking more about this patch, this requires you to know whether a given object file is going to be linked into a DLL when building the C++ source so that you can pass -LD to clang-cl.  That may be not easy to get right depending on the build system, and when things go wrong you might need nasty -nodefaultlib arguments to the linker.  Maybe this is not the right approach after all?</div>



</blockquote><div><br></div></div><div>Oh, true.  I forgot about the DLL thunk library.</div></div></div></div></blockquote><div><br></div></div><div>OK, I think I'll drop this patch then.  Sorry for wasting your time!<br>


</div><div class=""><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_extra">
<div class="gmail_quote"><div>Honestly, I think we need to completely revisit our CRT interceptor approach so we can support MD, maybe MDd, and avoid the extra DLL thunk stuff.  I don't have brilliant ideas for fixing this at the moment, though.  :(</div>



</div></div></div>
</blockquote></div></div><br></div><div class="gmail_extra">Do you know where I should look to figure out why the existing strategy has been employed?  If I understand the reasons things were done this way better, perhaps I can figure out a way to reuse Firefox's malloc replacement techniques with -MD/MDd in the ASAN runtime...</div>
</div></blockquote><div><br></div><div>I have to defer to Timur, here.  I think the Firefox malloc replacement techniques are probably the way to go, but ASan has many more interceptors than just malloc&co. It hooks all the str* functions, for example.</div>
</div></div></div>