<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Fri, Mar 4, 2016 at 2:34 PM, Kostya Serebryany <span dir="ltr"><<a href="mailto:kcc@google.com" target="_blank">kcc@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><br><div class="gmail_quote"><span class="">On Fri, Mar 4, 2016 at 11:32 AM, Derek Bruening <span dir="ltr"><<a href="mailto:bruening@google.com" target="_blank">bruening@google.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">bruening added a comment.<br>
<br>
What if instead we moved the strlen interceptors that are currently private to asan, tsan, and msan into the set of common interceptors, thus ensuring that REAL(strlen) exists (as well as unifying the currently duplicate interceptors)?  I actually already have a local CL that moves strlen and strchr* into the common set which I can send for review.<br></blockquote></span><div>In most cases such unification is more than welcome! </div><div>(Just need to be careful not to lose any functionality) </div></div></div></div></blockquote><div><br></div><div>Putting more into the common set will make it easier to add new tools as well.</div><div><br></div><div>Perhaps you could give your thoughts on some of the complexities involved:</div><div><ul><li>Are you ok with asan's replace_str flag applying not just to "string routines" but also to string-typed parameters (e.g., the first parameter to glob())?</li><li>Currently, asan's replace_str flag does not apply to string routines already in the common set (AFAICT).  Presumably this is not intentional.</li><li>Are you ok with adding interceptors to a sanitizer that were not there before: e.g., putting strchr into the common set will add it to msan (it's already in asan and tsan). Is there additional testing that must be done in such cases beyond the llvm tests?</li></ul><div><br></div></div></div></div></div>