[PATCH] hppa: Fix stack alignment passed to clone

Florian Weimer fw@deneb.enyo.de
Sat Oct 19 19:17:00 GMT 2019


* 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.



More information about the Libc-alpha mailing list