[PATCH] Fix tst-getpid{1,2} on ia64 (take 2)
Jakub Jelinek
jakub@redhat.com
Thu Mar 10 11:18:00 GMT 2005
On Tue, Mar 08, 2005 at 05:40:02PM +0100, Andreas Schwab wrote:
> It can't be worse than the current situation.
>
> > If it is bigger than stack alignment, GCC disregards it (or just aligns
> > to stack alignment?), if it is on some arch smaller than needed stack
> > alignment, then it will not help.
>
> IMHO it should be ok for now. GCC already needs to know how to keep the
> stack aligned anyway.
Ok, let's go with this instead then...
2005-03-10 Jakub Jelinek <jakub@redhat.com>
* tst-getpid1.c (do_test): Align stack passed to clone{2,}.
--- libc/nptl/tst-getpid1.c.jj 2004-12-15 12:16:06.000000000 +0100
+++ libc/nptl/tst-getpid1.c 2005-03-10 12:16:18.988119781 +0100
@@ -44,10 +44,10 @@ do_test (void)
extern int __clone2 (int (*__fn) (void *__arg), void *__child_stack_base,
size_t __child_stack_size, int __flags,
void *__arg, ...);
- char st[256 * 1024];
+ char st[256 * 1024] __attribute__ ((aligned));
pid_t p = __clone2 (f, st, sizeof (st), TEST_CLONE_FLAGS, 0);
#else
- char st[128 * 1024];
+ char st[128 * 1024] __attribute__ ((aligned));
pid_t p = clone (f, st + sizeof (st), TEST_CLONE_FLAGS, 0);
#endif
if (p == -1)
Jakub
More information about the Libc-hacker
mailing list