This commit is contained in:
parent
29eb69344c
commit
39637ed822
@ -1,3 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:e60bf361e9a96b3903a30f323f6d6f00e88604cd6212f5666af9ca294df793ff
|
||||
size 6729
|
||||
oid sha256:22f69b9eac5371c11a8dcc3e09de34a79c9a3d391fa3e7a7c35510255deb68da
|
||||
size 10179
|
||||
|
@ -1,41 +0,0 @@
|
||||
| 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;
|
20
bash-4.0.17-globstar.dif
Normal file
20
bash-4.0.17-globstar.dif
Normal file
@ -0,0 +1,20 @@
|
||||
--- lib/glob/glob.c
|
||||
+++ lib/glob/glob.c 2009-04-21 10:51:48.478986919 +0000
|
||||
@@ -96,7 +96,7 @@ int noglob_dot_filenames = 1;
|
||||
int glob_ignore_case = 0;
|
||||
|
||||
/* Global variable to return to signify an error in globbing. */
|
||||
-char *glob_error_return;
|
||||
+char *glob_error_return = (char *)NULL;
|
||||
|
||||
static struct globval finddirs_error_return;
|
||||
|
||||
@@ -356,7 +356,7 @@ finddirs (pat, sdir, flags, ep, np)
|
||||
*np = 0;
|
||||
if (ep)
|
||||
*ep = 0;
|
||||
- if (r)
|
||||
+ if (r && r != (char **)&glob_error_return)
|
||||
free (r);
|
||||
return (struct globval *)0;
|
||||
}
|
20
bash.changes
20
bash.changes
@ -1,3 +1,23 @@
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 21 12:53:39 CEST 2009 - werne@suse.de
|
||||
|
||||
- Do not crash on forbidden subdirectories with globstar extension
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 15 11:27:56 CEST 2009 - werne@suse.de
|
||||
|
||||
- Add fix to be able to clear to eol in readline library
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Apr 14 12:10:31 CEST 2009 - werne@suse.de
|
||||
|
||||
- Add fix for timing issue in readline SIGWINCH handling
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Apr 8 14:14:10 CEST 2009 - werne@suse.de
|
||||
|
||||
- Add patches from bug-bash@gnu.org to avoid eg. segmentation fault
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Mar 16 11:38:14 CET 2009 - werner@suse.de
|
||||
|
||||
|
34
bash.spec
34
bash.spec
@ -27,7 +27,7 @@ Recommends: bash-doc = %bash_vers
|
||||
Suggests: command-not-found
|
||||
AutoReqProv: on
|
||||
Version: 4.0
|
||||
Release: 7
|
||||
Release: 8
|
||||
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
|
||||
@ -58,8 +58,10 @@ Patch22: readline-6.0-wrap.patch
|
||||
Patch23: readline-5.2-conf.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
|
||||
Patch43: readline-6.0-redisplay-sigwinch.patch
|
||||
Patch44: readline-6.0-display-clear-to-eol.patch
|
||||
Patch45: bash-4.0.17-globstar.dif
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
%global _sysconfdir /etc
|
||||
%global _incdir %{_includedir}
|
||||
@ -87,7 +89,7 @@ Group: Documentation/Man
|
||||
Provides: bash:%{_infodir}/bash.info.gz
|
||||
PreReq: %install_info_prereq
|
||||
Version: 4.0
|
||||
Release: 7
|
||||
Release: 8
|
||||
AutoReqProv: on
|
||||
|
||||
%description -n bash-doc
|
||||
@ -107,7 +109,7 @@ Summary: The Readline Library
|
||||
Group: System/Libraries
|
||||
Provides: bash:/%{_lib}/libreadline.so.%{rl_major}
|
||||
Version: 6.0
|
||||
Release: 7
|
||||
Release: 8
|
||||
Recommends: readline-doc = %{version}
|
||||
# bug437293
|
||||
%ifarch ppc64
|
||||
@ -136,7 +138,7 @@ Summary: Include Files and Libraries mandatory for Development
|
||||
Group: Development/Libraries/C and C++
|
||||
Provides: bash:%{_libdir}/libreadline.a
|
||||
Version: 6.0
|
||||
Release: 7
|
||||
Release: 8
|
||||
Requires: libreadline6 = %{version}
|
||||
Requires: ncurses-devel
|
||||
Recommends: readline-doc = %{version}
|
||||
@ -165,7 +167,7 @@ Group: System/Libraries
|
||||
Provides: readline:%{_infodir}/readline.info.gz
|
||||
PreReq: %install_info_prereq
|
||||
Version: 6.0
|
||||
Release: 7
|
||||
Release: 8
|
||||
AutoReqProv: on
|
||||
|
||||
%description -n readline-doc
|
||||
@ -204,8 +206,8 @@ unset p
|
||||
%patch22 -p0 -b .wrap
|
||||
%patch23 -p0 -b .conf
|
||||
%patch40 -p0 -b .pipe
|
||||
%patch41 -p0 -b .segfault
|
||||
%patch42 -p0 -b .typo
|
||||
%patch45 -p0 -b .globstar
|
||||
%patch0 -p0
|
||||
cd ../readline-%{rl_vers}
|
||||
for p in ../readline-%{rl_vers}-patches/*; do
|
||||
@ -217,6 +219,8 @@ done
|
||||
%patch22 -p2 -b .wrap
|
||||
%patch23 -p2 -b .conf
|
||||
%patch30 -p0 -b .destdir
|
||||
%patch43 -p0 -b .sigwinch
|
||||
%patch44 -p0 -b .cleartoeol
|
||||
%patch20 -p0
|
||||
|
||||
%build
|
||||
@ -511,6 +515,14 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true
|
||||
%doc %{_defaultdocdir}/readline/
|
||||
|
||||
%changelog
|
||||
* Tue Apr 21 2009 werne@suse.de
|
||||
- Do not crash on forbidden subdirectories with globstar extension
|
||||
* Wed Apr 15 2009 werne@suse.de
|
||||
- Add fix to be able to clear to eol in readline library
|
||||
* Tue Apr 14 2009 werne@suse.de
|
||||
- Add fix for timing issue in readline SIGWINCH handling
|
||||
* Wed Apr 08 2009 werne@suse.de
|
||||
- Add patches from bug-bash@gnu.org to avoid eg. segmentation fault
|
||||
* 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
|
||||
@ -599,7 +611,7 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true
|
||||
- add ncurses-devel requires to readline-devel
|
||||
* Mon Mar 26 2007 rguenther@suse.de
|
||||
- Add bison and ncurses-devel BuildRequires.
|
||||
* Tue Mar 06 2007 rguenther@suse.de
|
||||
* Wed Mar 07 2007 rguenther@suse.de
|
||||
- Fix order of changelog entries. Remove duplicate entry.
|
||||
* Wed Feb 28 2007 werner@suse.de
|
||||
- Don't access buffer but resulting pointer for array element names
|
||||
@ -732,7 +744,7 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true
|
||||
- Fix prompt problem with invisible characters (bug #36919)
|
||||
* Fri Sep 17 2004 werner@suse.de
|
||||
- Fix line wraping for newlines in prompt (bug #45519)
|
||||
* Wed Sep 15 2004 schwab@suse.de
|
||||
* Thu Sep 16 2004 schwab@suse.de
|
||||
- Fix missing return value.
|
||||
* Sat Sep 11 2004 kukuk@suse.de
|
||||
- Disable use of WCONTINUED as long as bash does not check if
|
||||
@ -916,7 +928,7 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true
|
||||
* Thu Apr 12 2001 werner@suse.de
|
||||
- Provide cpp macro OLD_READLINE for backwards compatibility
|
||||
at compile time with old readline interface
|
||||
* Wed Apr 11 2001 ro@suse.de
|
||||
* Thu Apr 12 2001 ro@suse.de
|
||||
- added split-alias as provides (again)
|
||||
* Wed Apr 11 2001 werner@suse.de
|
||||
- Update to bash 2.05 and readline 4.2
|
||||
@ -952,7 +964,7 @@ ldd -u -r %{buildroot}%{_libdir}/libreadline.so || true
|
||||
* Tue Feb 15 2000 schwab@suse.de
|
||||
- Update config.{guess,sub} to latest version.
|
||||
- Fix spec file to create doc directory before installing into it.
|
||||
* Fri Jan 28 2000 werner@suse.de
|
||||
* Sat Jan 29 2000 werner@suse.de
|
||||
- Add mailstat patch (handles mail directories)
|
||||
- Fix configuration (system is %%arch-suse-linux)
|
||||
- Fix segfault (job handling)
|
||||
|
15
readline-6.0-display-clear-to-eol.patch
Normal file
15
readline-6.0-display-clear-to-eol.patch
Normal file
@ -0,0 +1,15 @@
|
||||
*** display.c 2009-01-04 14:32:32.000000000 -0500
|
||||
--- display.c 2009-04-14 14:00:18.000000000 -0400
|
||||
***************
|
||||
*** 1773,1777 ****
|
||||
adjust col_lendiff based on the difference between _rl_last_c_pos
|
||||
and _rl_screenwidth */
|
||||
! if (col_lendiff && (_rl_last_c_pos < _rl_screenwidth))
|
||||
#endif
|
||||
{
|
||||
--- 1773,1777 ----
|
||||
adjust col_lendiff based on the difference between _rl_last_c_pos
|
||||
and _rl_screenwidth */
|
||||
! if (col_lendiff && ((MB_CUR_MAX == 1 || rl_byte_oriented) || (_rl_last_c_pos < _rl_screenwidth)))
|
||||
#endif
|
||||
{
|
51
readline-6.0-redisplay-sigwinch.patch
Normal file
51
readline-6.0-redisplay-sigwinch.patch
Normal file
@ -0,0 +1,51 @@
|
||||
*** readline.h 2009-01-04 14:32:33.000000000 -0500
|
||||
--- readline.h 2009-04-13 08:47:00.000000000 -0400
|
||||
***************
|
||||
*** 815,820 ****
|
||||
#define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
|
||||
#define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
|
||||
|
||||
! #define RL_STATE_DONE 0x800000 /* done; accepted line */
|
||||
|
||||
#define RL_SETSTATE(x) (rl_readline_state |= (x))
|
||||
--- 815,821 ----
|
||||
#define RL_STATE_MULTIKEY 0x200000 /* reading multiple-key command */
|
||||
#define RL_STATE_VICMDONCE 0x400000 /* entered vi command mode at least once */
|
||||
+ #define RL_STATE_REDISPLAYING 0x800000 /* updating terminal display */
|
||||
|
||||
! #define RL_STATE_DONE 0x1000000 /* done; accepted line */
|
||||
|
||||
#define RL_SETSTATE(x) (rl_readline_state |= (x))
|
||||
*** display.c 2009-01-04 14:32:32.000000000 -0500
|
||||
--- display.c 2009-04-13 08:29:54.000000000 -0400
|
||||
***************
|
||||
*** 513,516 ****
|
||||
--- 513,517 ----
|
||||
data structures. */
|
||||
_rl_block_sigint ();
|
||||
+ RL_SETSTATE (RL_STATE_REDISPLAYING);
|
||||
|
||||
if (!rl_display_prompt)
|
||||
***************
|
||||
*** 1237,1240 ****
|
||||
--- 1238,1242 ----
|
||||
}
|
||||
|
||||
+ RL_UNSETSTATE (RL_STATE_REDISPLAYING);
|
||||
_rl_release_sigint ();
|
||||
}
|
||||
*** terminal.c 2009-01-04 14:32:34.000000000 -0500
|
||||
--- terminal.c 2009-04-13 08:43:00.000000000 -0400
|
||||
***************
|
||||
*** 356,360 ****
|
||||
if (CUSTOM_REDISPLAY_FUNC ())
|
||||
rl_forced_update_display ();
|
||||
! else
|
||||
_rl_redisplay_after_sigwinch ();
|
||||
}
|
||||
--- 356,360 ----
|
||||
if (CUSTOM_REDISPLAY_FUNC ())
|
||||
rl_forced_update_display ();
|
||||
! else if (RL_ISSTATE(RL_STATE_REDISPLAYING) == 0)
|
||||
_rl_redisplay_after_sigwinch ();
|
||||
}
|
Loading…
Reference in New Issue
Block a user