<div dir="ltr">On 12 August 2013 16:36, Richard Smith <span dir="ltr"><<a href="mailto:richard@metafoo.co.uk" target="_blank">richard@metafoo.co.uk</a>></span> wrote:<br><div class="gmail_extra"><div class="gmail_quote">


<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">LGTM, thanks!<br></blockquote><div><br></div><div>Thanks! I'd like to give the other sanitizer folks a chance to complain, so I'm going to wait until tomorrow before committing it.</div>


<div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span style="color:rgb(80,0,80)">On Mon, Aug 12, 2013 at 4:25 PM, Nick Lewycky </span><span dir="ltr" style="color:rgb(80,0,80)"><<a href="mailto:nlewycky@google.com" target="_blank">nlewycky@google.com</a>></span><span style="color:rgb(80,0,80)"> wrote:</span><br>


<div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div>
<div dir="ltr">The attached patch causes ubsan to get linked in when building a .so file. This is different from other sanitizers.<div><br></div><div>The other sanitizers are harder to deploy because they rely on replacing malloc. This means that you have to figure out how to link in a single malloc in the final binary.</div>





<div><br></div><div>ubsan doesn't need this. You could link a .so file with ubsan, then link the final binary with no knowledge that ubsan was ever involved, and it will work just fine. (Or rather, it will after this patch.) In particular, I can't currently build a python module with ubsan and then load it into a normal python. The attached patch makes this work.</div>





<div><br></div><div>The downside to this patch is that we can end up with multiple copies of the ubsan runtime linked in. In reality this works fine because the ubsan runtime doesn't keep much state (and it'd be difficult to make it do so correctly because it has to support calling through files that are a mix of built and not build with ubsan). We'll end up with multiple copies of ubsan's vptr cache, which in turn will probably improve performance by improving locality.</div>





<div><br></div><div>Please review!</div><span><font color="#888888"><div><br></div><div>Nick</div><div><br></div></font></span></div>
<br></div></div>_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@cs.uiuc.edu" target="_blank">cfe-commits@cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits</a><br>
<br></blockquote></div><br>
</blockquote></div><br></div></div>