This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: tst-pthread-getattr changes break sparc


From: Siddhesh Poyarekar <siddhesh@redhat.com>
Date: Fri, 27 Jul 2012 16:06:51 +0530

> On Tue, 24 Jul 2012 16:53:26 -0700 (PDT), David wrote:
>> The trick you use to try and avoid touching the allocated stack space
>> in allocate_and_test() doesn't work on sparc.  Any alloca() call must
>> absolutely, at all times, be within the stack rlimit even if you do
>> not touch the allocated memory space explicitly.
>> 
>> At any moment we can trap into the operating system and that will
>> cause the current register window to be saved wherever the stack
>> pointer is.  After the alloca() call, this stack pointer will be
>> beyond what is allowed by the rlimit setting.
>> 
>> And this causes tst-pthread-getattr as currently implemented to fail
>> on sparc.
> 
> I've been thinking about this and realized that even if I manage to get
> the stack pointer to get just within the rlimit to verify that the
> memory at top of stack is accessible, the above behaviour will still
> break the test. So I would then have to leave sufficient space for the
> register window so that all of it is written within rlimit.
> 
> This means that I won't be checking the top of stack with the test,
> which basically misses the point of doing this test at all. Would it be
> a better idea instead to disable this test for sparc in the Makefile?

What's the test actually trying to verify?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]