Accepting request 33340 from Base:System

Copy from Base:System/bash based on submit request 33340 from user WernerFink

OBS-URL: https://build.opensuse.org/request/show/33340
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/bash?expand=0&rev=51
This commit is contained in:
OBS User autobuild 2010-02-25 10:11:42 +00:00 committed by Git OBS Bridge
commit 0c91902444
3 changed files with 37 additions and 8 deletions

View File

@ -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

View File

@ -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

View File

@ -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