<div dir="ltr">Hi,<div><br></div><div>I consider reducing the usage of blacklist in sanitizer instrumentation passes and doing the necessary work in frontend (Clang) instead.</div><div><br></div><div>Some of it is already implemented: e.g. Clang will attach an attribute "sanitize_address" to function definition only if this function is not blacklisted. In this case we won't instrument the memory accesses in this function in ASan instrumentation pass, so there's no need to looking at blacklist once again.</div>
<div><br></div><div>TSan pass does the following:</div><div><br></div><div>1) instruments plain memory accesses</div><div>2) instruments atomic accesses</div><div>3) instruments memory intrinsics calls.</div><div>4) adds function entry/exit callbacks.</div>
<div><br></div><div>If a function doesn't have sanitize_thread attribute (e.g. it was annotated with __attribute__((no_sanitize_thread)) ), then it still does (2), (3) and (4). If a function is blacklisted,</div><div>
TSan pass does nothing. Shouldn't the behavior be the same? I think, we must always do (4) to get</div><div>good stack traces, and probably do (2) (we may report races on atomics in this case, but otherwise</div><div>
we may miss synchronization). Thoughts?</div><div><div><br></div>-- <br><div dir="ltr">Alexey Samsonov<br><a href="mailto:vonosmas@gmail.com" target="_blank">vonosmas@gmail.com</a></div>
</div></div>