[PATCH] Take 2: Fix false positives in tst-pthread-getattr test case

Siddhesh Poyarekar siddhesh@redhat.com
Fri Jul 20 11:58:00 GMT 2012


Hi,

Back in June, Carlos saw a failure in a test case I had written:

http://sourceware.org/ml/libc-alpha/2012-06/msg00599.html

While analysing this, I discovered that portions of the test case were
being optimized out by some versions of gcc, resulting in false
positives in some cases (and Carlos was not so (un)lucky).
Additionally, there was a mysterious problem in the kernel (still is,
AFAICT) where it would (occasionally) incorrectly return the
RLIMIT_STACK as unlimited. I attempted a fix for the optimization:

http://sourceware.org/ml/libc-alpha/2012-06/msg00713.html

but there was still a mysterious problem in the kernel. I was asked not
to commit the change since we were in 2.16 freeze. I have now redone
the patch a bit (attached), adding a cap to the stack size we test with
in the patch to 8M to work around the mysterious kernel behaviour. Does
this look OK to commit?

Regards,
Siddhesh


nptl/ChangeLog:

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

	* tst-pthread-getattr.c (MAX_STACK_SIZE): New max cap for stack
	size.
	(_MIN): New macro.
	(allocate_and_test): Return STACKADDR.  Access STACKADDR instead
	of MEM to test.
	(check_stack_top): Read valued written into STACKADDR in
	allocate_and_test.  Cap stack size to MAX_STACK_SIZE.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pthread-test-fix.patch
Type: text/x-patch
Size: 3224 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20120720/234e85ca/attachment.bin>


More information about the Libc-alpha mailing list