OBS User unknown 2009-03-20 18:04:18 +00:00 committed by Git OBS Bridge
parent 7afd50e1e4
commit 9ec5cca5b8
7 changed files with 127 additions and 19 deletions

View File

@ -1,10 +0,0 @@
--- pcomplete.c
+++ pcomplete.c 2009-03-04 11:58:05.296254166 +0000
@@ -1032,6 +1032,7 @@ gen_shell_function_matches (cs, text, li
cmdlist = build_arg_list (funcname, text, lwords, cw);
pps = &ps;
+ save_parser_state (pps);
begin_unwind_frame ("gen-shell-function-matches");
add_unwind_protect (restore_parser_state, (char *)pps);
add_unwind_protect (dispose_words, (char *)cmdlist);

View File

@ -1,3 +1,3 @@
version https://git-lfs.github.com/spec/v1 version https://git-lfs.github.com/spec/v1
oid sha256:edcca232666f913366fb75f95c08c1a4275c29de0e464dae77fa8bec72bc8314 oid sha256:e60bf361e9a96b3903a30f323f6d6f00e88604cd6212f5666af9ca294df793ff
size 3959 size 6729

View File

@ -0,0 +1,29 @@
|> On Wed, Mar 11, 2009 at 09:50:18PM -0400, Matt
|> > rm 2>&1 | grep --color op
|> > rm |& grep --color op
|> >
|> > Notice that they are behaving differently.
|>
|> Confirmed in 4.0.0 and 4.0.10:
|
|Interesting. Only for non-builtin simple commands and some shell functions.
|The attached patch fixes it for me.
|
|Chet
|
*** parse.y 2009-03-09 10:27:05.000000000 -0400
--- parse.y 2009-03-12 09:02:31.000000000 -0400
***************
*** 1123,1127 ****
REDIRECT *r;
! tc = $1;
rd.dest = 1;
r = make_redirection (2, r_duplicating_output, rd);
--- 1123,1127 ----
REDIRECT *r;
! tc = $1->type == cm_simple ? $1->value.Simple : $1;
rd.dest = 1;
r = make_redirection (2, r_duplicating_output, rd);

View File

@ -0,0 +1,41 @@
| Date: Sat, 14 Mar 2009 14:00:35 +0800
| From: "Clark J. Wang" <dearvoid@gmail.com>
| To: Bash - Bug <bug-bash@gnu.org>
| Subject: [bash-bug] [PATCH] bash-4.0.10: segfault with `; &' at the end of case statement
|
| With bash version: 4.0.10, the following case statement crashed with
| segfault:
|
| $ cat foo.sh
| case a in
| a) echo a ;&
| esac
| $ bash4 foo.sh
| a
| Segmentation fault
| $
|
| In an interactive shell, that case statement causes current shell to hang
| with nearly 100% CPU usage.
|
| The following patch fixes this for me:
|
*** execute_cmd.c 2009-02-14 05:41:41.000000000 +0800
--- execute_cmd.c 2009-03-14 13:47:15.000000000 +0800
***************
*** 2932,2938 ****
retval = execute_command (clauses->action);
}
while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next));
! if ((clauses->flags & CASEPAT_TESTNEXT) == 0)
EXIT_CASE ();
else
break;
--- 2932,2938 ----
retval = execute_command (clauses->action);
}
while ((clauses->flags & CASEPAT_FALLTHROUGH) && (clauses = clauses->next));
! if (!clauses || (clauses->flags & CASEPAT_TESTNEXT) == 0)
EXIT_CASE ();
else
break;

21
bash-4.0.10-typo.patch Normal file
View File

@ -0,0 +1,21 @@
| Date: Sat, 14 Mar 2009 21:14:06 +0100
| From: Andreas Schwab <schwab@linux-m68k.org>
| To: bug-bash@gnu.org
| Subject: [bash-bug] Doc typo
|
| A small typo in the bash doc.
|
| Andreas.
|
--- doc/bashref.texi 2009-02-18 21:14:43.000000000 +0100
+++ doc/bashref.texi 2009-03-14 21:11:36.000000000 +0100
@@ -864,7 +864,7 @@ operator terminates a pattern list.
A list of patterns and an associated command-list is known
as a @var{clause}.
-Each clause must be terminated with @samp{;;}, @samp{,&}, or @samp{;;&}.
+Each clause must be terminated with @samp{;;}, @samp{;&}, or @samp{;;&}.
The @var{word} undergoes tilde expansion, parameter expansion, command
substitution, arithmetic expansion, and quote removal before matching is
attempted. Each @var{pattern} undergoes tilde expansion, parameter

View File

@ -1,3 +1,19 @@
-------------------------------------------------------------------
Mon Mar 16 11:38:14 CET 2009 - werner@suse.de
- Add patches from bug-bash@gnu.org to avoid eg. segmentation fault
-------------------------------------------------------------------
Thu Mar 12 15:05:55 CET 2009 - werner@suse.de
- Add patch from bug-bash@gnu.org to enable |& not only for
builtins and shell functions but for all commands.
-------------------------------------------------------------------
Tue Mar 10 14:50:55 CET 2009 - werner@suse.de
- Switch to official patches, now we are on patch level 10
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Mar 4 17:36:35 CET 2009 - werner@suse.de Wed Mar 4 17:36:35 CET 2009 - werner@suse.de

View File

@ -27,7 +27,7 @@ Recommends: bash-doc = %bash_vers
Suggests: command-not-found Suggests: command-not-found
AutoReqProv: on AutoReqProv: on
Version: 4.0 Version: 4.0
Release: 6 Release: 7
Summary: The GNU Bourne-Again Shell Summary: The GNU Bourne-Again Shell
Url: http://www.gnu.org/software/bash/bash.html Url: http://www.gnu.org/software/bash/bash.html
Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.bz2 Source0: ftp://ftp.gnu.org/gnu/bash/bash-%{bash_vers}.tar.bz2
@ -52,12 +52,14 @@ Patch11: bash-4.0-loadables.dif
Patch14: bash-3.2-sigrestart.patch Patch14: bash-3.2-sigrestart.patch
Patch15: bash-3.2-longjmp.dif Patch15: bash-3.2-longjmp.dif
Patch16: bash-4.0-setlocale.dif Patch16: bash-4.0-setlocale.dif
Patch17: bash-4.0-complete.dif
Patch20: readline-%{rl_vers}.dif Patch20: readline-%{rl_vers}.dif
Patch21: readline-4.3-input.dif Patch21: readline-4.3-input.dif
Patch22: readline-6.0-wrap.patch Patch22: readline-6.0-wrap.patch
Patch23: readline-5.2-conf.patch Patch23: readline-5.2-conf.patch
Patch30: readline-6.0-destdir.patch Patch30: readline-6.0-destdir.patch
Patch40: bash-4.0.10-bar-and-piping.patch
Patch41: bash-4.0.10-segfault.patch
Patch42: bash-4.0.10-typo.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%global _sysconfdir /etc %global _sysconfdir /etc
%global _incdir %{_includedir} %global _incdir %{_includedir}
@ -85,7 +87,7 @@ Group: Documentation/Man
Provides: bash:%{_infodir}/bash.info.gz Provides: bash:%{_infodir}/bash.info.gz
PreReq: %install_info_prereq PreReq: %install_info_prereq
Version: 4.0 Version: 4.0
Release: 6 Release: 7
AutoReqProv: on AutoReqProv: on
%description -n bash-doc %description -n bash-doc
@ -105,7 +107,7 @@ Summary: The Readline Library
Group: System/Libraries Group: System/Libraries
Provides: bash:/%{_lib}/libreadline.so.%{rl_major} Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
Version: 6.0 Version: 6.0
Release: 6 Release: 7
Recommends: readline-doc = %{version} Recommends: readline-doc = %{version}
# bug437293 # bug437293
%ifarch ppc64 %ifarch ppc64
@ -134,7 +136,7 @@ Summary: Include Files and Libraries mandatory for Development
Group: Development/Libraries/C and C++ Group: Development/Libraries/C and C++
Provides: bash:%{_libdir}/libreadline.a Provides: bash:%{_libdir}/libreadline.a
Version: 6.0 Version: 6.0
Release: 6 Release: 7
Requires: libreadline6 = %{version} Requires: libreadline6 = %{version}
Requires: ncurses-devel Requires: ncurses-devel
Recommends: readline-doc = %{version} Recommends: readline-doc = %{version}
@ -163,7 +165,7 @@ Group: System/Libraries
Provides: readline:%{_infodir}/readline.info.gz Provides: readline:%{_infodir}/readline.info.gz
PreReq: %install_info_prereq PreReq: %install_info_prereq
Version: 6.0 Version: 6.0
Release: 6 Release: 7
AutoReqProv: on AutoReqProv: on
%description -n readline-doc %description -n readline-doc
@ -198,10 +200,12 @@ unset p
%patch14 -p0 -b .sigrestart %patch14 -p0 -b .sigrestart
%patch15 -p0 -b .longjmp %patch15 -p0 -b .longjmp
%patch16 -p0 -b .setlocale %patch16 -p0 -b .setlocale
%patch17 -p0 -b .complete
%patch21 -p0 -b .zerotty %patch21 -p0 -b .zerotty
%patch22 -p0 -b .wrap %patch22 -p0 -b .wrap
%patch23 -p0 -b .conf %patch23 -p0 -b .conf
%patch40 -p0 -b .pipe
%patch41 -p0 -b .segfault
%patch42 -p0 -b .typo
%patch0 -p0 %patch0 -p0
cd ../readline-%{rl_vers} cd ../readline-%{rl_vers}
for p in ../readline-%{rl_vers}-patches/*; do for p in ../readline-%{rl_vers}-patches/*; do
@ -507,6 +511,13 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true
%doc %{_defaultdocdir}/readline/ %doc %{_defaultdocdir}/readline/
%changelog %changelog
* Mon Mar 16 2009 werner@suse.de
- Add patches from bug-bash@gnu.org to avoid eg. segmentation fault
* Thu Mar 12 2009 werner@suse.de
- Add patch from bug-bash@gnu.org to enable |& not only for
builtins and shell functions but for all commands.
* Tue Mar 10 2009 werner@suse.de
- Switch to official patches, now we are on patch level 10
* Wed Mar 04 2009 werner@suse.de * Wed Mar 04 2009 werner@suse.de
- Use patches from bug-bash@gnu.org to make it work - Use patches from bug-bash@gnu.org to make it work
* Wed Mar 04 2009 werner@suse.de * Wed Mar 04 2009 werner@suse.de