tst-pthread-getattr changes break sparc

Siddhesh Poyarekar siddhesh@redhat.com
Fri Jul 27 16:52:00 GMT 2012


On Fri, 27 Jul 2012 11:00:15 -0400, Chris wrote:
> It might be simpler to just test that the page pointed to by
> "stackaddr" is accessible.  You could target your alloca() request to
> stackaddr plus half of getpagesize(), and not worry about the precise
> details of alloca's overhead.  I don't think there's any need to
> worry about whether the bottom of that bottom page is accessible or
> not, if we can show that the middle of the bottom page is
> accessible.  It feels like it would make the code a lot less finicky.

Thanks, I've used your idea and put in a fix to the test case. The fix
is now in the siddhesh/getattr branch. David, can you please verify
that this now works on sparc?

The effective patch to master is attached. I have verified that the
test case works correctly on x86_64.

Regards,
Siddhesh

nptl/ChangeLog:

2012-07-27  Siddhesh Poyarekar  <siddhesh@redhat.com>

	* tst-pthread-getattr.c (MAX_STACK_SIZE): New macro.
	(_MIN): New macro function.
	(allocate_and_test): Return MEM.  Rename parameter to TARGET.
	(check_stack_top): New local variable MEM.  Cap stack size
	to MAX_STACK_SIZE using _MIN.  Call allocate_and_test for
	halfway up the stack top page.  Verify that the top page was
	written into.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread-test-fix.patch
Type: text/x-patch
Size: 4368 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120727/b8059f4b/attachment.bin>


More information about the Libc-alpha mailing list