I like the idea (it may actually fix the problem reported today on wine), <div>but we need to guard the code that uses sysinfo/sysinfo.h with ASAN_USE_SYSINFO==1 (see asan_stack.cc).</div><div>Or add some macro machinery to get sysinfo.h from an alternative place as in perftools (base/sysinfo.h). </div>
<div><div><br></div><div>--kcc <br><br><div class="gmail_quote">On Wed, Dec 21, 2011 at 4:04 AM, Evgeniy Stepanov <span dir="ltr"><<a href="mailto:eugeni.stepanov@gmail.com">eugeni.stepanov@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
<br>
if __asan_init is called from .preinit_array, pthread_getattr_np may<br>
become unsafe. This patch adds a different way of locating the stack<br>
of the main thread with a combination of getlrimit() and<br>
/proc/self/maps.<br>
</blockquote></div><br></div></div>