[llvm-commits] [PATCH] asan-rt: discover main thread stack limits without pthread

Kostya Serebryany kcc at google.com
Tue Dec 27 15:24:39 PST 2011


I like the idea (it may actually fix the problem reported today on wine),
but we need to guard the code that uses sysinfo/sysinfo.h
with ASAN_USE_SYSINFO==1 (see asan_stack.cc).
Or add some macro machinery to get sysinfo.h from an alternative place as
in perftools (base/sysinfo.h).

--kcc

On Wed, Dec 21, 2011 at 4:04 AM, Evgeniy Stepanov <eugeni.stepanov at gmail.com
> wrote:

> Hi,
>
> if __asan_init is called from .preinit_array, pthread_getattr_np may
> become unsafe. This patch adds a different way of locating the stack
> of the main thread with a combination of getlrimit() and
> /proc/self/maps.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111227/d855f8ce/attachment.html>


More information about the llvm-commits mailing list