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

r4927 - in glibc-package/trunk/debian: . patches patches/hurd-i386



Author: sthibault
Date: 2011-08-25 23:25:20 +0000 (Thu, 25 Aug 2011)
New Revision: 4927

Added:
   glibc-package/trunk/debian/patches/hurd-i386/submitted-libc_stack_end.diff
Removed:
   glibc-package/trunk/debian/patches/hurd-i386/submitted-PTRACE_CONTINUE.diff
Modified:
   glibc-package/trunk/debian/changelog
   glibc-package/trunk/debian/patches/series
Log:
Add patches/hurd-i386/submitted-libc_stack_end.diff to fix ruby1.9.1 stack detection.


Modified: glibc-package/trunk/debian/changelog
===================================================================
--- glibc-package/trunk/debian/changelog	2011-08-24 22:05:05 UTC (rev 4926)
+++ glibc-package/trunk/debian/changelog	2011-08-25 23:25:20 UTC (rev 4927)
@@ -14,6 +14,10 @@
     submitted-hurdsig-fixes.diff.
   * libc0.3.symbols.hurd-i386: Add version for global-disposition functions.
 
+  [ Samuel Thibault ]
+  * Add patches/hurd-i386/submitted-libc_stack_end.diff to fix ruby1.9.1 stack
+    detection.
+
  -- Aurelien Jarno <aurel32@debian.org>  Wed, 24 Aug 2011 12:34:56 +0200
 
 eglibc (2.13-18) unstable; urgency=low

Deleted: glibc-package/trunk/debian/patches/hurd-i386/submitted-PTRACE_CONTINUE.diff
===================================================================
Added: glibc-package/trunk/debian/patches/hurd-i386/submitted-libc_stack_end.diff
===================================================================
--- glibc-package/trunk/debian/patches/hurd-i386/submitted-libc_stack_end.diff	                        (rev 0)
+++ glibc-package/trunk/debian/patches/hurd-i386/submitted-libc_stack_end.diff	2011-08-25 23:25:20 UTC (rev 4927)
@@ -0,0 +1,75 @@
+http://www.cygwin.com/ml/libc-alpha/2011-08/msg00124.html
+
+2011-08-24  Samuel Thibault  <samuel.thibault@ens-lyon.org>
+
+* sysdeps/generic/ldsodefs.h [LIBC_STACK_END_NOT_RELRO] (__libc_stack_end): Do
+not use attribute_relro.
+* sysdeps/mach/hurd/dl-sysdep.h (LIBC_STACK_END_NOT_RELRO): Define.
+* sysdeps/mach/hurd/i386/init-first.c (init): Update __libc_stack_end to
+libthread-provided value.
+* sysdeps/mach/hurd/dl-sysdep.c (__libc_stack_end): Do not use attribute_relro.
+
+---
+ generic/ldsodefs.h          |    6 +++++-
+ mach/hurd/dl-sysdep.c       |    2 +-
+ mach/hurd/dl-sysdep.h       |    3 ++-
+ mach/hurd/i386/init-first.c |    2 ++
+ 4 files changed, 10 insertions(+), 3 deletions(-)
+
+diff --git a/sysdeps/generic/ldsodefs.h b/sysdeps/generic/ldsodefs.h
+index d040590..cb24ca7 100644
+--- a/sysdeps/generic/ldsodefs.h
++++ b/sysdeps/generic/ldsodefs.h
+@@ -723,7 +723,11 @@ rtld_hidden_proto (_dl_make_stack_executable)
+    might use the variable which results in copy relocations on some
+    platforms.  But this does not matter, ld.so can always use the local
+    copy.  */
+-extern void *__libc_stack_end attribute_relro;
++extern void *__libc_stack_end
++#ifndef LIBC_STACK_END_NOT_RELRO
++     attribute_relro
++#endif
++     ;
+ rtld_hidden_proto (__libc_stack_end)
+ 
+ /* Parameters passed to the dynamic linker.  */
+diff --git a/sysdeps/mach/hurd/dl-sysdep.h b/sysdeps/mach/hurd/dl-sysdep.h
+index 4b21b77..8f1c728 100644
+--- a/sysdeps/mach/hurd/dl-sysdep.h
++++ b/sysdeps/mach/hurd/dl-sysdep.h
+@@ -25,7 +25,8 @@
+ #define RTLD_PRIVATE_ERRNO 0
+ 
+ #ifdef SHARED
+-/* _dl_argv cannot be attribute_relro, because the stack-switching
++/* _dl_argv and __libc_stack_end cannot be attribute_relro, because the stack-switching
+    libc initializer for using cthreads might write into it.  */
+ # define DL_ARGV_NOT_RELRO 1
++# define LIBC_STACK_END_NOT_RELRO 1
+ #endif
+diff --git a/sysdeps/mach/hurd/i386/init-first.c b/sysdeps/mach/hurd/i386/init-first.c
+index e79af1d..7b2ea12 100644
+--- a/sysdeps/mach/hurd/i386/init-first.c
++++ b/sysdeps/mach/hurd/i386/init-first.c
+@@ -227,6 +224,8 @@ init (int *_data)
+ 
+       void switch_stacks (void);
+ 
++      __libc_stack_end = newsp;
++
+       /* Copy per-thread variables from that temporary
+ 	 area onto the new cthread stack.  */
+       memcpy (__hurd_threadvar_location_from_sp (0, newsp),
+diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c
+index a63151f..a5df5c1 100644
+--- a/sysdeps/mach/hurd/dl-sysdep.c
++++ b/sysdeps/mach/hurd/dl-sysdep.c
+@@ -55,7 +55,7 @@ INTVARDEF(__libc_enable_secure)
+ int __libc_multiple_libcs = 0;	/* Defining this here avoids the inclusion
+ 				   of init-first.  */
+ /* This variable containts the lowest stack address ever used.  */
+-void *__libc_stack_end attribute_relro = NULL;
++void *__libc_stack_end = NULL;
+ rtld_hidden_data_def(__libc_stack_end)
+ void *_dl_random attribute_relro = NULL; /* TODO */
+ 

Modified: glibc-package/trunk/debian/patches/series
===================================================================
--- glibc-package/trunk/debian/patches/series	2011-08-24 22:05:05 UTC (rev 4926)
+++ glibc-package/trunk/debian/patches/series	2011-08-25 23:25:20 UTC (rev 4927)
@@ -151,6 +151,7 @@
 hurd-i386/submitted-hurdsig-global-dispositions.diff
 hurd-i386/submitted-hurdsig-SA_SIGINFO.diff
 hurd-i386/submitted-hurdsig-fixes-2.diff
+hurd-i386/submitted-libc_stack_end.diff
 
 ia64/local-dlfptr.diff
 ia64/submitted-sysconf.diff


Reply to: