From b6e36247625d5dd51c193c0efc347fce2e7b62d079e18f0114bc553ba9f19edf Mon Sep 17 00:00:00 2001 From: OBS User buildservice-autocommit Date: Thu, 25 Feb 2010 10:11:42 +0000 Subject: [PATCH] Updating link to change in openSUSE:Factory/bash revision 51 OBS-URL: https://build.opensuse.org/package/show/Base:System/bash?expand=0&rev=a7b50e67052b4137b157ce99ce38a302 --- bash-4.1-intr.dif | 26 +++++++++++++++++++++++++- bash.changes | 5 +++++ bash.spec | 14 +++++++------- 3 files changed, 37 insertions(+), 8 deletions(-) diff --git a/bash-4.1-intr.dif b/bash-4.1-intr.dif index d5a101b..6affafc 100644 --- a/bash-4.1-intr.dif +++ b/bash-4.1-intr.dif @@ -15,7 +15,7 @@ #if 0 --- xmalloc.c -+++ xmalloc.c 2010-02-15 15:36:40.113797875 +0000 ++++ xmalloc.c 2010-02-24 08:32:51.452626384 +0000 @@ -35,6 +35,11 @@ # include "ansi_stdlib.h" #endif /* HAVE_STDLIB_H */ @@ -121,3 +121,27 @@ if (temp == 0) allocerr ("xrealloc", bytes); +@@ -145,7 +204,22 @@ xfree (string) + PTR_T string; + { + if (string) +- free (string); ++ { ++ sigset_t set, oset; ++ int blocked_sigs = 0; ++ ++ /* Block all signals in case we are executed from a signal handler. */ ++ if (interrupt_immediately || signal_is_trapped (SIGINT) || signal_is_trapped (SIGCHLD)) ++ { ++ block_signals (&set, &oset); ++ blocked_sigs = 1; ++ } ++ ++ free (string); ++ ++ if (blocked_sigs) ++ unblock_signals (&set, &oset); ++ } + } + + #ifdef USING_BASH_MALLOC diff --git a/bash.changes b/bash.changes index d05731f..025268a 100644 --- a/bash.changes +++ b/bash.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Feb 24 09:55:03 CET 2010 - werner@suse.de + +- Avoid hang due malloc()/free() within signal handler (bnc#522351) + ------------------------------------------------------------------- Thu Feb 18 11:05:13 CET 2010 - werner@suse.de diff --git a/bash.spec b/bash.spec index c7f2c25..ab454e4 100644 --- a/bash.spec +++ b/bash.spec @@ -28,7 +28,7 @@ Recommends: bash-lang = %bash_vers Suggests: command-not-found AutoReqProv: on Version: 4.1 -Release: 1 +Release: 2 Summary: The GNU Bourne-Again Shell Url: http://www.gnu.org/software/bash/bash.html Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.bz2 @@ -91,7 +91,7 @@ Group: Documentation/Man Provides: bash:%{_infodir}/bash.info.gz PreReq: %install_info_prereq Version: 4.1 -Release: 1 +Release: 2 AutoReqProv: on %if %suse_version > 1120 BuildArch: noarch @@ -114,7 +114,7 @@ License: GPLv2+ Summary: Include Files mandatory for Development of bash loadable builtins Group: Development/Languages/C and C++ Version: 4.1 -Release: 1 +Release: 2 AutoReqProv: on %description -n bash-devel @@ -134,7 +134,7 @@ License: GPLv2+ Summary: Loadable bash builtins Group: System/Shells Version: 4.1 -Release: 1 +Release: 2 AutoReqProv: on %description -n bash-loadables @@ -203,7 +203,7 @@ Summary: The Readline Library Group: System/Libraries Provides: bash:/%{_lib}/libreadline.so.%{rl_major} Version: 6.1 -Release: 1 +Release: 2 Recommends: readline-doc = %{version} # bug437293 %ifarch ppc64 @@ -232,7 +232,7 @@ Summary: Include Files and Libraries mandatory for Development Group: Development/Libraries/C and C++ Provides: bash:%{_libdir}/libreadline.a Version: 6.1 -Release: 1 +Release: 2 Requires: libreadline6 = %{version} Requires: ncurses-devel Recommends: readline-doc = %{version} @@ -261,7 +261,7 @@ Group: System/Libraries Provides: readline:%{_infodir}/readline.info.gz PreReq: %install_info_prereq Version: 6.1 -Release: 1 +Release: 2 AutoReqProv: on %if %suse_version > 1120 BuildArch: noarch