]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
[BZ #4455]
authorUlrich Drepper <drepper@redhat.com>
Mon, 7 May 2007 22:15:16 +0000 (22:15 +0000)
committerUlrich Drepper <drepper@redhat.com>
Mon, 7 May 2007 22:15:16 +0000 (22:15 +0000)
* tst-align2.c (do_test): Add _STACK_GROWS_UP case.
* tst-getpid1.c (do_test): Likewise.

nptl/ChangeLog
nptl/tst-align2.c
nptl/tst-getpid1.c

index db2adf710713d756d6c649862618b19e03d458f2..1151a6c9022c44ec3a8a8f81bd038f8dd6b1b021 100644 (file)
@@ -1,5 +1,9 @@
 2007-05-02  Carlos O'Donell  <carlos@systemhalted.org>
 
+       [BZ #4455]
+       * tst-align2.c (do_test): Add _STACK_GROWS_UP case.
+       * tst-getpid1.c (do_test): Likewise.
+
        [BZ #4456]
        * allocatestack.c (change_stack_perm): Add _STACK_GROWS_UP case.
        (allocate_stack): Likewise.
index ec85f435b6bd0372260833320eda36d0d3309bbc..4685c201e4a02942d254f73689f74f3eb2dcb4a1 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2004 Free Software Foundation, Inc.
+/* Copyright (C) 2004, 2007 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
 
    The GNU C Library is free software; you can redistribute it and/or
@@ -53,8 +53,14 @@ do_test (void)
   char st[256 * 1024];
   pid_t p = __clone2 (f, st, sizeof (st), 0, 0);
 #else
-  char st[128 * 1024];
+  char st[128 * 1024] __attribute__ ((aligned));
+# if _STACK_GROWS_DOWN
   pid_t p = clone (f, st + sizeof (st), 0, 0);
+# elif _STACK_GROWS_UP
+  pid_t p = clone (f, st, 0, 0);
+# else
+#  error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
+# endif
 #endif
   if (p == -1)
     {
index f9fd4fc0ca74b3c7037a849eb977649ce73dd83c..e15cb611515afe75857ef88b994bc7dd0f06ec68 100644 (file)
@@ -48,7 +48,13 @@ do_test (void)
   pid_t p = __clone2 (f, st, sizeof (st), TEST_CLONE_FLAGS, 0);
 #else
   char st[128 * 1024] __attribute__ ((aligned));
+# if _STACK_GROWS_DOWN
   pid_t p = clone (f, st + sizeof (st), TEST_CLONE_FLAGS, 0);
+# elif _STACK_GROWS_UP
+  pid_t p = clone (f, st, TEST_CLONE_FLAGS, 0);
+# else
+#  error "Define either _STACK_GROWS_DOWN or _STACK_GROWS_UP"
+# endif
 #endif
   if (p == -1)
     {