This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Fix tst-getpid{1,2} on ia64 (take 2)


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]