- libsigsegv-2.9 (#593618)
This commit is contained in:
		
							parent
							
								
									f96cbc365b
								
							
						
					
					
						commit
						8157730a35
					
				
							
								
								
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										2
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @ -1 +1 @@ | |||||||
| libsigsegv-2.6.tar.gz | /libsigsegv-2.9.tar.gz | ||||||
|  | |||||||
| @ -1,112 +0,0 @@ | |||||||
| From 4f14ef87b2fba9718c1a88b9ed9ca7ba111d60da Mon Sep 17 00:00:00 2001 |  | ||||||
| From: Paolo Bonzini <pbonzini@redhat.com> |  | ||||||
| Date: Tue, 22 Sep 2009 08:10:43 +0000 |  | ||||||
| Subject: Fix crash of stackoverflow2 on x86_64-linux. |  | ||||||
| 
 |  | ||||||
| ---
 |  | ||||||
| diff --git a/src/sigsegv.h.in b/src/sigsegv.h.in
 |  | ||||||
| index 85f337d..6b8e4c7 100644
 |  | ||||||
| --- a/src/sigsegv.h.in
 |  | ||||||
| +++ b/src/sigsegv.h.in
 |  | ||||||
| @@ -121,9 +121,11 @@ typedef void (*stackoverflow_handler_t) (int emergency, stackoverflow_context_t
 |  | ||||||
|  /* |  | ||||||
|   * Installs a stack overflow handler. |  | ||||||
|   * The extra_stack argument is a pointer to a pre-allocated area used as a |  | ||||||
| - * stack for executing the handler. It is typically allocated by use of
 |  | ||||||
| - * `alloca' during `main'. Its size should be sufficiently large.
 |  | ||||||
| - * The following code determines an appropriate size:
 |  | ||||||
| + * stack for executing the handler. It typically comes from a static variable
 |  | ||||||
| + * or from heap-allocated memoty; placing it on the main stack may fail on
 |  | ||||||
| + * some operating systems.
 |  | ||||||
| + * Its size, passed in extra_stack_size, should be sufficiently large.  The
 |  | ||||||
| + * following code determines an appropriate size:
 |  | ||||||
|   *   #include <signal.h> |  | ||||||
|   *   #ifndef SIGSTKSZ         / * glibc defines SIGSTKSZ for this purpose * / |  | ||||||
|   *   # define SIGSTKSZ 16384  / * on most platforms, 16 KB are sufficient * / |  | ||||||
| diff --git a/tests/stackoverflow1.c b/tests/stackoverflow1.c
 |  | ||||||
| index 0970e79..23eff58 100644
 |  | ||||||
| --- a/tests/stackoverflow1.c
 |  | ||||||
| +++ b/tests/stackoverflow1.c
 |  | ||||||
| @@ -88,12 +88,13 @@ recurse (volatile int n)
 |  | ||||||
|    return *recurse_1 (n, &n); |  | ||||||
|  } |  | ||||||
|   |  | ||||||
| +/* glibc says: Users should use SIGSTKSZ as the size of user-supplied
 |  | ||||||
| +   buffers.  */
 |  | ||||||
| +char mystack[2 * SIGSTKSZ];
 |  | ||||||
| +
 |  | ||||||
|  int |  | ||||||
|  main () |  | ||||||
|  { |  | ||||||
| -  /* glibc says: Users should use SIGSTKSZ as the size of user-supplied
 |  | ||||||
| -     buffers.  */
 |  | ||||||
| -  char mystack[SIGSTKSZ];
 |  | ||||||
|    sigset_t emptyset; |  | ||||||
|   |  | ||||||
|  #if HAVE_SETRLIMIT && defined RLIMIT_STACK |  | ||||||
| diff --git a/tests/stackoverflow2.c b/tests/stackoverflow2.c
 |  | ||||||
| index 2475bf2..4a07c66 100644
 |  | ||||||
| --- a/tests/stackoverflow2.c
 |  | ||||||
| +++ b/tests/stackoverflow2.c
 |  | ||||||
| @@ -109,12 +109,13 @@ recurse (volatile int n)
 |  | ||||||
|    return *recurse_1 (n, &n); |  | ||||||
|  } |  | ||||||
|   |  | ||||||
| +/* glibc says: Users should use SIGSTKSZ as the size of user-supplied
 |  | ||||||
| +   buffers.  */
 |  | ||||||
| +char mystack[2 * SIGSTKSZ];
 |  | ||||||
| +
 |  | ||||||
|  int |  | ||||||
|  main () |  | ||||||
|  { |  | ||||||
| -  /* glibc says: Users should use SIGSTKSZ as the size of user-supplied
 |  | ||||||
| -     buffers.  */
 |  | ||||||
| -  char mystack[SIGSTKSZ];
 |  | ||||||
|    sigset_t emptyset; |  | ||||||
|    void *p; |  | ||||||
|   |  | ||||||
| --
 |  | ||||||
| cgit v0.8.2.1 |  | ||||||
| diff -up libsigsegv-2.6/m4/sigaltstack-longjmp.m4.stack2 libsigsegv-2.6/m4/sigaltstack-longjmp.m4
 |  | ||||||
| --- libsigsegv-2.6/m4/sigaltstack-longjmp.m4.stack2	2008-08-24 15:40:16.000000000 -0500
 |  | ||||||
| +++ libsigsegv-2.6/m4/sigaltstack-longjmp.m4	2009-09-22 13:26:07.552664938 -0500
 |  | ||||||
| @@ -51,9 +51,9 @@ int recurse (volatile int n)
 |  | ||||||
|    int sum = 0; |  | ||||||
|    return *recurse_1 (n, &sum); |  | ||||||
|  } |  | ||||||
| +char mystack[2 * SIGSTKSZ];
 |  | ||||||
|  int main () |  | ||||||
|  { |  | ||||||
| -  char mystack[SIGSTKSZ];
 |  | ||||||
|    stack_t altstack; |  | ||||||
|    struct sigaction action; |  | ||||||
|    sigset_t emptyset; |  | ||||||
| diff -up libsigsegv-2.6/m4/sigaltstack.m4.stack2 libsigsegv-2.6/m4/sigaltstack.m4
 |  | ||||||
| --- libsigsegv-2.6/m4/sigaltstack.m4.stack2	2008-08-24 15:41:10.000000000 -0500
 |  | ||||||
| +++ libsigsegv-2.6/m4/sigaltstack.m4	2009-09-22 13:25:47.462666140 -0500
 |  | ||||||
| @@ -71,9 +71,10 @@ int recurse (volatile int n)
 |  | ||||||
|    int sum = 0; |  | ||||||
|    return *recurse_1 (n, &sum); |  | ||||||
|  } |  | ||||||
| +char mystack[2 * SIGSTKSZ];
 |  | ||||||
| +
 |  | ||||||
|  int main () |  | ||||||
|  { |  | ||||||
| -  char mystack[SIGSTKSZ];
 |  | ||||||
|    stack_t altstack; |  | ||||||
|    struct sigaction action; |  | ||||||
|  #if defined HAVE_SETRLIMIT && defined RLIMIT_STACK |  | ||||||
| diff -up libsigsegv-2.6/m4/sigaltstack-siglongjmp.m4.stack2 libsigsegv-2.6/m4/sigaltstack-siglongjmp.m4
 |  | ||||||
| --- libsigsegv-2.6/m4/sigaltstack-siglongjmp.m4.stack2	2008-08-24 15:40:49.000000000 -0500
 |  | ||||||
| +++ libsigsegv-2.6/m4/sigaltstack-siglongjmp.m4	2009-09-22 13:26:43.994665249 -0500
 |  | ||||||
| @@ -49,9 +49,9 @@ int recurse (volatile int n)
 |  | ||||||
|    int sum = 0; |  | ||||||
|    return *recurse_1 (n, &sum); |  | ||||||
|  } |  | ||||||
| +char mystack[2 * SIGSTKSZ];
 |  | ||||||
|  int main () |  | ||||||
|  { |  | ||||||
| -  char mystack[SIGSTKSZ];
 |  | ||||||
|    stack_t altstack; |  | ||||||
|    struct sigaction action; |  | ||||||
|  #ifdef __BEOS__ |  | ||||||
| @ -3,8 +3,8 @@ | |||||||
| 
 | 
 | ||||||
| Summary: Library for handling page faults in user mode | Summary: Library for handling page faults in user mode | ||||||
| Name:    libsigsegv | Name:    libsigsegv | ||||||
| Version: 2.6 | Version: 2.9 | ||||||
| Release: 6%{?dist} | Release: 1%{?dist} | ||||||
| 
 | 
 | ||||||
| License: GPLv2+ | License: GPLv2+ | ||||||
| URL:     http://libsigsegv.sourceforge.net/ | URL:     http://libsigsegv.sourceforge.net/ | ||||||
| @ -12,13 +12,7 @@ Source0: http://ftp.gnu.org/gnu/libsigsegv/libsigsegv-%{version}.tar.gz | |||||||
| Group:   System Environment/Libraries | Group:   System Environment/Libraries | ||||||
| BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) | ||||||
| 
 | 
 | ||||||
| #Patch1: libsigsegv-2.6-confdefs_debug.patch |  | ||||||
| 
 |  | ||||||
| ## upstream patches | ## upstream patches | ||||||
| # based on: |  | ||||||
| # http://git.savannah.gnu.org/cgit/libsigsegv.git/patch/?id=4f14ef87b2fba9718c1a88b9ed9ca7ba111d60da |  | ||||||
| # http://git.savannah.gnu.org/cgit/libsigsegv.git/patch/?id=54b612e978e26a52b5706272dabf84ed9d895fa7 |  | ||||||
| Patch100: libsigsegv-2.6-mystack.patch |  | ||||||
| 
 | 
 | ||||||
| Source1: sigsegv-wrapper.h | Source1: sigsegv-wrapper.h | ||||||
| 
 | 
 | ||||||
| @ -38,7 +32,7 @@ technique for implementing: | |||||||
| %package devel | %package devel | ||||||
| Summary: Development libraries and header files for %{name}  | Summary: Development libraries and header files for %{name}  | ||||||
| Group:   Development/Libraries | Group:   Development/Libraries | ||||||
| Requires: %{name} = %{version}-%{release} | Requires: %{name}%{?_isa} = %{version}-%{release} | ||||||
| %description devel | %description devel | ||||||
| %{summary}. | %{summary}. | ||||||
| 
 | 
 | ||||||
| @ -53,9 +47,6 @@ Requires: %{name}-devel = %{version}-%{release} | |||||||
| %prep | %prep | ||||||
| %setup -q | %setup -q | ||||||
| 
 | 
 | ||||||
| %patch100 -p1 -b .mystack |  | ||||||
| autoreconf |  | ||||||
| 
 |  | ||||||
| 
 | 
 | ||||||
| %build | %build | ||||||
| %configure \ | %configure \ | ||||||
| @ -79,13 +70,12 @@ make install DESTDIR=%{buildroot} | |||||||
| 
 | 
 | ||||||
| rm -f %{buildroot}%{_libdir}/lib*.la | rm -f %{buildroot}%{_libdir}/lib*.la | ||||||
| 
 | 
 | ||||||
| %if 0%{?fedora} > 11 | # move shlib to %{_lib} | ||||||
| pushd %{buildroot}%{_libdir} | pushd %{buildroot}%{_libdir} | ||||||
| mkdir ../../%{_lib} | mkdir ../../%{_lib} | ||||||
| mv libsigsegv.so.0* ../../%{_lib}/ | mv libsigsegv.so.2* ../../%{_lib}/ | ||||||
| ln -sf ../../%{_lib}/libsigsegv.so.0 %{buildroot}%{_libdir}/libsigsegv.so | ln -sf ../../%{_lib}/libsigsegv.so.2 %{buildroot}%{_libdir}/libsigsegv.so | ||||||
| popd | popd | ||||||
| %endif |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %check | %check | ||||||
| @ -104,11 +94,7 @@ rm -rf %{buildroot} | |||||||
| %files | %files | ||||||
| %defattr(-,root,root,-) | %defattr(-,root,root,-) | ||||||
| %doc AUTHORS COPYING NEWS README | %doc AUTHORS COPYING NEWS README | ||||||
| %if 0%{?fedora} > 11 | /%{_lib}/libsigsegv.so.2* | ||||||
| /%{_lib}/libsigsegv.so.0* |  | ||||||
| %else |  | ||||||
| %{_libdir}/libsigsegv.so.0* |  | ||||||
| %endif |  | ||||||
| 
 | 
 | ||||||
| %files devel | %files devel | ||||||
| %defattr(-,root,root,-) | %defattr(-,root,root,-) | ||||||
| @ -124,6 +110,9 @@ rm -rf %{buildroot} | |||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| %changelog | %changelog | ||||||
|  | * Sat Nov 27 2010 Rex Dieter <rdieter@fedoraproject.org> - 2.9-1 | ||||||
|  | - libsigsegv-2.9 (#593618) | ||||||
|  | 
 | ||||||
| * Tue Sep 22 2009 Rex Dieter <rdieter@fedoraproject.org> - 2.6-6 | * Tue Sep 22 2009 Rex Dieter <rdieter@fedoraproject.org> - 2.6-6 | ||||||
| - respin mystack patch | - respin mystack patch | ||||||
| 
 | 
 | ||||||
|  | |||||||
		Loading…
	
		Reference in New Issue
	
	Block a user