Created attachment 12022 [details] Patch to check stack alignment in clone The nptl/tst-tls1 test calls pthread_create with a misaligned stack: /* Also check the alignment of the tls variables if a misaligned stack is specified. */ pthread_t th; void *thr_stack = NULL; thr_stack = xposix_memalign (0x200, STACK_SIZE + 1); xpthread_attr_setstack (&a, thr_stack + 1, STACK_SIZE); th = xpthread_create (&a, tf, NULL); xpthread_join (th); free (thr_stack); This fails on hppa because the stack needs to be at least word aligned in syscalls. One possible fix is to check the stack alignment in clone. But this doesn't fix test. However, as far as I can tell, it seem legit to reject a misaligned stack.
The master branch has been updated by John David Anglin <danglin@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=e4c23a029a54c8c7788eff9ca771a01cccaaa0ce commit e4c23a029a54c8c7788eff9ca771a01cccaaa0ce Author: John David Anglin <danglin@gcc.gnu.org> Date: Sun Nov 3 16:28:01 2019 -0500 hppa: Align __clone stack argument to 8 bytes (Bug 25066) The hppa architecture requires strict alignment for loads and stores. As a result, the minimum stack alignment that will work is 8 bytes. This patch adjusts __clone() to align the stack argument passed to it. It also adjusts slightly some formatting. This fixes the nptl/tst-tls1 test.
Fixed on master.
The release/2.30/master branch has been updated by Aurelien Jarno <aurel32@sourceware.org>: https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=43598ef6e2b1a8226db9f83dac9e93224306e242 commit 43598ef6e2b1a8226db9f83dac9e93224306e242 Author: John David Anglin <danglin@gcc.gnu.org> Date: Sun Nov 3 16:28:01 2019 -0500 hppa: Align __clone stack argument to 8 bytes (Bug 25066) The hppa architecture requires strict alignment for loads and stores. As a result, the minimum stack alignment that will work is 8 bytes. This patch adjusts __clone() to align the stack argument passed to it. It also adjusts slightly some formatting. This fixes the nptl/tst-tls1 test. (cherry picked from commit e4c23a029a54c8c7788eff9ca771a01cccaaa0ce)