[llvm-commits] [PATCH] asan-rt: discover main thread stack limits without pthread
Evgeniy Stepanov
eugeni.stepanov at gmail.com
Wed Dec 28 03:38:38 PST 2011
In fact, I'd like copy or reimplement ProcMapsIterator as part of ASan
to escape the ifdef hell.
But this should be good enough, lets land it first.
On Wed, Dec 28, 2011 at 3:24 AM, Kostya Serebryany <kcc at google.com> wrote:
> 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 --------------
A non-text attachment was scrubbed...
Name: stack.patch
Type: text/x-patch
Size: 1599 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20111228/271fb67e/attachment.bin>
More information about the llvm-commits
mailing list