This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH] hppa: Fix stack alignment passed to clone
- From: Florian Weimer <fw at deneb dot enyo dot de>
- To: John David Anglin <dave dot anglin at bell dot net>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Carlos O'Donell <carlos at redhat dot com>
- Date: Sat, 19 Oct 2019 21:17:15 +0200
- Subject: Re: [PATCH] hppa: Fix stack alignment passed to clone
- References: <d04fea6f-9898-339c-05b2-602ac4148bc1@bell.net>
* John David Anglin:
> 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 adjust __clone() to align the stack argument
> passed to it. It also adjusts slightly some formatting.
>
> This fixes the nptl/tst-tls1 test.
I wonder if we should change this in nptl/tst-tls1
xpthread_attr_setstack (&a, thr_stack + 1, STACK_SIZE);
to:
xpthread_attr_setstack (&a, thr_stack + _Alignof (max_align_t), STACK_SIZE);
This should fix the test on hppa. Since the alignment of the test TLS
variables is much larger than that of max_align_t, I don't think it
interferes with the objective of the test.