This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


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

GNU C Library master sources branch master updated. glibc-2.19-159-g2e03fae


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  2e03fae7b711b87733f8c897cb42ea74d2dc156a (commit)
      from  43ca83ecc482f34e002d5f0accfb4a7cef471e4a (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=2e03fae7b711b87733f8c897cb42ea74d2dc156a

commit 2e03fae7b711b87733f8c897cb42ea74d2dc156a
Author: Carlos O'Donell <carlos@redhat.com>
Date:   Wed Mar 5 00:11:01 2014 -0500

    hppa: Add _STACK_GROWS_* cases to pthread_attr_[sg]etstack.
    
    This is one of a several NPTL patches to build glibc on hppa.
    
    The pthread_attr_[sg]etstack functions are defined by POSIX as
    taking a stackaddr that is the lowest addressable byte of the
    storage used for the stack. However, the internal iattr variable
    of the same name in NPTL is actually the final stack address
    as usable in the stack pointer for the machine. Therefore the
    NPTL implementation must add and subtract stacksize for
    _STACK_GROWS_DOWN architectures. HPPA is a _STACK_GROWS_UP
    architecture and doesn't need to add or subtract anything,
    the stack address *is* the lowest addressable byte of the
    storage.
    
    Tested on hppa-linux-gnu, with no regressions.
    
    Can't impact any other targets because of the conditionals.
    
    If nobody objects I'll check this in at the end of the week.
    
    I can't see there being any objections to this patch except
    that it introduces more code to maintain for an old architecture
    (perhaps we'll get another _S_G_U target in the future?).

diff --git a/ChangeLog b/ChangeLog
index a9cff1d..2837093 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-03-13  Carlos O'Donell  <carlos@redhat.com>
+
+	* nptl/pthread_attr_setstack.c (__pthread_attr_setstack)
+	[!_STACK_GROWS_DOWN]: Don't add stacksize to stackaddr.
+	(__old_pthread_attr_setstack): Likewise.
+	* nptl/pthread_attr_getstack.c (__pthread_attr_getstack)
+	[!_STACK_GROWS_DOWN]: Likewise.
+
 2014-03-13  Mike Frysinger  <vapier@gentoo.org>
 
 	* config.make.in (have-bash2): Delete.
@@ -86,7 +94,7 @@
 
 	[BZ #16381]
 	* elf/Makefile (tests): Add tst-pie2.
-        (tests-pie): Add tst-pie2.
+	(tests-pie): Add tst-pie2.
 	* elf/tst-pie2.c: New file.
 	* elf/dl-load.c (_dl_map_object_from_fd): Assert correct l_type
 	for ET_EXEC.
diff --git a/nptl/pthread_attr_getstack.c b/nptl/pthread_attr_getstack.c
index 3f4fd8d..0e245a0 100644
--- a/nptl/pthread_attr_getstack.c
+++ b/nptl/pthread_attr_getstack.c
@@ -32,7 +32,11 @@ __pthread_attr_getstack (attr, stackaddr, stacksize)
   iattr = (struct pthread_attr *) attr;
 
   /* Store the result.  */
+#if _STACK_GROWS_DOWN
   *stackaddr = (char *) iattr->stackaddr - iattr->stacksize;
+#else
+  *stackaddr = (char *) iattr->stackaddr;
+#endif
   *stacksize = iattr->stacksize;
 
   return 0;
diff --git a/nptl/pthread_attr_setstack.c b/nptl/pthread_attr_setstack.c
index 19a5b54..4785501 100644
--- a/nptl/pthread_attr_setstack.c
+++ b/nptl/pthread_attr_setstack.c
@@ -48,7 +48,11 @@ __pthread_attr_setstack (attr, stackaddr, stacksize)
 #endif
 
   iattr->stacksize = stacksize;
+#if _STACK_GROWS_DOWN
   iattr->stackaddr = (char *) stackaddr + stacksize;
+#else
+  iattr->stackaddr = (char *) stackaddr;
+#endif
   iattr->flags |= ATTR_FLAG_STACKADDR;
 
   return 0;
@@ -81,7 +85,11 @@ __old_pthread_attr_setstack (pthread_attr_t *attr, void *stackaddr,
 #  endif
 
   iattr->stacksize = stacksize;
+#if _STACK_GROWS_DOWN
   iattr->stackaddr = (char *) stackaddr + stacksize;
+#else
+  iattr->stackaddr = (char *) stackaddr;
+#endif
   iattr->flags |= ATTR_FLAG_STACKADDR;
 
   return 0;

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                    |   10 +++++++++-
 nptl/pthread_attr_getstack.c |    4 ++++
 nptl/pthread_attr_setstack.c |    8 ++++++++
 3 files changed, 21 insertions(+), 1 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


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