[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

r6655 - in glibc-package/branches/glibc-2.21/debian: . patches patches/hppa



Author: aurel32
Date: 2015-10-19 08:05:06 +0000 (Mon, 19 Oct 2015)
New Revision: 6655

Added:
   glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-allocatestack-stacktop.diff
Modified:
   glibc-package/branches/glibc-2.21/debian/changelog
   glibc-package/branches/glibc-2.21/debian/patches/hppa/local-stack-grows-up.diff
   glibc-package/branches/glibc-2.21/debian/patches/series
Log:
* patches/hppa/cvs-allocatestack-stacktop.diff: new patch from upstream
  to fix a set-but-unused warning in nptl/allocatestack.c, causing a
  build failure.
* patches/hppa/local-stack-grows-up.diff: rebase.

Modified: glibc-package/branches/glibc-2.21/debian/changelog
===================================================================
--- glibc-package/branches/glibc-2.21/debian/changelog	2015-10-19 05:05:33 UTC (rev 6654)
+++ glibc-package/branches/glibc-2.21/debian/changelog	2015-10-19 08:05:06 UTC (rev 6655)
@@ -1,6 +1,10 @@
 glibc (2.21-0experimental3) UNRELEASED; urgency=medium
 
-  * 
+  [ Aurelien Jarno ]
+  * patches/hppa/cvs-allocatestack-stacktop.diff: new patch from upstream
+    to fix a set-but-unused warning in nptl/allocatestack.c, causing a
+    build failure.
+  * patches/hppa/local-stack-grows-up.diff: rebase.
 
  -- Aurelien Jarno <aurel32@debian.org>  Mon, 19 Oct 2015 07:05:23 +0200
 

Added: glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-allocatestack-stacktop.diff
===================================================================
--- glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-allocatestack-stacktop.diff	                        (rev 0)
+++ glibc-package/branches/glibc-2.21/debian/patches/hppa/cvs-allocatestack-stacktop.diff	2015-10-19 08:05:06 UTC (rev 6655)
@@ -0,0 +1,46 @@
+2015-08-05  Mike Frysinger  <vapier@gentoo.org>
+
+	* nptl/allocatestack.c (allocate_stack): Move stacktop decl down to
+	bottom and under _STACK_GROWS_DOWN.  Move the stacktop assignment
+	in there too.
+
+--- a/nptl/allocatestack.c
++++ b/nptl/allocatestack.c
+@@ -353,7 +353,6 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
+   struct pthread *pd;
+   size_t size;
+   size_t pagesize_m1 = __getpagesize () - 1;
+-  void *stacktop;
+ 
+   assert (powerof2 (pagesize_m1 + 1));
+   assert (TCB_ALIGNMENT >= STACK_ALIGN);
+@@ -717,19 +716,23 @@ allocate_stack (const struct pthread_attr *attr, struct pthread **pdp,
+   /* We place the thread descriptor at the end of the stack.  */
+   *pdp = pd;
+ 
+-#if TLS_TCB_AT_TP
++#if _STACK_GROWS_DOWN
++  void *stacktop;
++
++# if TLS_TCB_AT_TP
+   /* The stack begins before the TCB and the static TLS block.  */
+   stacktop = ((char *) (pd + 1) - __static_tls_size);
+-#elif TLS_DTV_AT_TP
++# elif TLS_DTV_AT_TP
+   stacktop = (char *) (pd - 1);
+-#endif
++# endif
+ 
+-#ifdef NEED_SEPARATE_REGISTER_STACK
++# ifdef NEED_SEPARATE_REGISTER_STACK
+   *stack = pd->stackblock;
+   *stacksize = stacktop - *stack;
+-#elif _STACK_GROWS_DOWN
++# else
+   *stack = stacktop;
+-#elif _STACK_GROWS_UP
++# endif
++#else
+   *stack = pd->stackblock;
+   assert (*stack > 0);
+ #endif

Modified: glibc-package/branches/glibc-2.21/debian/patches/hppa/local-stack-grows-up.diff
===================================================================
--- glibc-package/branches/glibc-2.21/debian/patches/hppa/local-stack-grows-up.diff	2015-10-19 05:05:33 UTC (rev 6654)
+++ glibc-package/branches/glibc-2.21/debian/patches/hppa/local-stack-grows-up.diff	2015-10-19 08:05:06 UTC (rev 6655)
@@ -1,28 +1,22 @@
----
- nptl/allocatestack.c         |   35 +++++++++++++++++++++++++----------
- nptl/pthread_create.c        |   19 ++++++++++++++++---
- nptl/pthread_getattr_np.c    |    4 ++++
- 5 files changed, 57 insertions(+), 13 deletions(-)
-
 --- a/nptl/allocatestack.c
 +++ b/nptl/allocatestack.c
-@@ -361,6 +361,15 @@
+@@ -371,6 +371,15 @@
    if (__glibc_unlikely (attr->flags & ATTR_FLAG_STACKADDR))
      {
        uintptr_t adj;
 +#if _STACK_GROWS_DOWN
 +      char * stackaddr = (char *) attr->stackaddr;
 +#else
-+      /* Assume the same layout as the _STACK_GROWS_DOWN case, 
-+	 with struct pthread at the top of the stack block. 
-+	 Later we adjust the guard location and stack address 
++      /* Assume the same layout as the _STACK_GROWS_DOWN case,
++	 with struct pthread at the top of the stack block.
++	 Later we adjust the guard location and stack address
 +	 to match the _STACK_GROWS_UP case.  */
 +      char * stackaddr = (char *) attr->stackaddr + attr->stacksize;
 +#endif
  
        /* If the user also specified the size of the stack make sure it
  	 is large enough.  */
-@@ -370,11 +379,11 @@
+@@ -380,11 +389,11 @@
  
        /* Adjust stack size for alignment of the TLS block.  */
  #if TLS_TCB_AT_TP
@@ -36,7 +30,7 @@
  	    & __static_tls_align_m1;
        assert (size > adj);
  #endif
-@@ -384,10 +393,10 @@
+@@ -394,10 +403,10 @@
  	 the stack.  It is the user's responsibility to do this if it
  	 is wanted.  */
  #if TLS_TCB_AT_TP
@@ -49,7 +43,7 @@
  				- __static_tls_size - adj)
  			       - TLS_PRE_TCB_SIZE);
  #endif
-@@ -399,7 +408,7 @@
+@@ -409,7 +418,7 @@
        pd->specific[0] = pd->specific_1stblock;
  
        /* Remember the stack-related values.  */
@@ -58,7 +52,7 @@
        pd->stackblock_size = size;
  
        /* This is a user-provided stack.  It will not be queued in the
-@@ -625,7 +634,7 @@
+@@ -633,7 +642,7 @@
  	  char *guard = mem + (((size - guardsize) / 2) & ~pagesize_m1);
  #elif _STACK_GROWS_DOWN
  	  char *guard = mem;
@@ -67,7 +61,7 @@
  	  char *guard = (char *) (((uintptr_t) pd - guardsize) & ~pagesize_m1);
  #endif
  	  if (mprotect (guard, guardsize, PROT_NONE) != 0)
-@@ -675,9 +684,13 @@
+@@ -683,9 +692,13 @@
  			prot) != 0)
  	    goto mprot_error;
  #elif _STACK_GROWS_UP
@@ -84,10 +78,10 @@
  #endif
  
  	  pd->guardsize = guardsize;
-@@ -720,8 +733,10 @@
- #elif _STACK_GROWS_DOWN
+@@ -732,8 +745,10 @@
    *stack = stacktop;
- #elif _STACK_GROWS_UP
+ # endif
+ #else
 +  /* We don't use stacktop. In _STACK_GROWS_UP the start
 +     of the stack is simply stackblock (lowest address of
 +     the stored block of memory for the stack).  */
@@ -98,7 +92,7 @@
    return 0;
 --- a/nptl/pthread_create.c
 +++ b/nptl/pthread_create.c
-@@ -399,12 +399,25 @@
+@@ -426,12 +426,25 @@
  #ifdef _STACK_GROWS_DOWN
    char *sp = CURRENT_STACK_FRAME;
    size_t freesize = (sp - (char *) pd->stackblock) & ~pagesize_m1;
@@ -109,11 +103,11 @@
    if (freesize > PTHREAD_STACK_MIN)
      __madvise (pd->stackblock, freesize - PTHREAD_STACK_MIN, MADV_DONTNEED);
 +#else
-+  /* Page aligned start of memory to free (higher than or equal 
++  /* Page aligned start of memory to free (higher than or equal
 +     to current sp plus the minimum stack size).  */
-+  void *freeblock = (void*)((size_t)(CURRENT_STACK_FRAME 
-+				     + PTHREAD_STACK_MIN 
-+				     + pagesize_m1) 
++  void *freeblock = (void*)((size_t)(CURRENT_STACK_FRAME
++				     + PTHREAD_STACK_MIN
++				     + pagesize_m1)
 +				    & ~pagesize_m1);
 +  char *free_end = (char *) (((uintptr_t) pd - pd->guardsize) & ~pagesize_m1);
 +  /* Is there any space to free?  */

Modified: glibc-package/branches/glibc-2.21/debian/patches/series
===================================================================
--- glibc-package/branches/glibc-2.21/debian/patches/series	2015-10-19 05:05:33 UTC (rev 6654)
+++ glibc-package/branches/glibc-2.21/debian/patches/series	2015-10-19 08:05:06 UTC (rev 6655)
@@ -56,6 +56,7 @@
 arm/cvs-memcpy-memmove-always-bx.diff
 arm/local-arm-futex.diff
 
+hppa/cvs-allocatestack-stacktop.diff
 hppa/local-inlining.diff
 hppa/local-stack-grows-up.diff
 hppa/local-elf-make-cflags.diff


Reply to: