readline: Update to 8.0.000
This commit is contained in:
parent
71277fa7a9
commit
af6ec49450
@ -2,8 +2,8 @@
|
|||||||
|
|
||||||
pkgbase=readline
|
pkgbase=readline
|
||||||
pkgname=('libreadline' 'libreadline-devel')
|
pkgname=('libreadline' 'libreadline-devel')
|
||||||
_basever=7.0
|
_basever=8.0
|
||||||
_patchlevel=005 #prepare for some patches
|
_patchlevel=000 #prepare for some patches
|
||||||
pkgver=${_basever}.${_patchlevel}
|
pkgver=${_basever}.${_patchlevel}
|
||||||
pkgrel=1
|
pkgrel=1
|
||||||
pkgdesc="GNU readline library"
|
pkgdesc="GNU readline library"
|
||||||
@ -23,22 +23,12 @@ if [ $_patchlevel -gt 00 ]; then
|
|||||||
source=(${source[@]} https://ftp.gnu.org/gnu/readline/readline-${_basever}-patches/readline${_basever//./}-$(printf "%03d" $p){,.sig})
|
source=(${source[@]} https://ftp.gnu.org/gnu/readline/readline-${_basever}-patches/readline${_basever//./}-$(printf "%03d" $p){,.sig})
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
sha256sums=('750d437185286f40a369e1e4f4764eda932b9459b5ec9a731628393dd3d32334'
|
sha256sums=('e339f51971478d369f8a053a330a190781acb9864cf4c541060f12078948e461'
|
||||||
'SKIP'
|
'SKIP'
|
||||||
'82289eeb21941e4b273839de68058d9f7901379615f9a481102eb874f34a7235'
|
'2fd3b112ad7cb16258efe960e59fdb1252d7a18397d45273c05ad2d216a63cf7'
|
||||||
'ebb548dfd63305dff579c223857944fbf756360498ae748df4357da243f0687d'
|
'cdb4f97d641acde59ada6f22141e6a6743f756fc183f5cb43d6c9f8ae563da29'
|
||||||
'4f2f97334d2e7fe362c9ef4e1fd06018d34115a8370c0323d0da67ca2b3d0761'
|
'05c08602b5aacd937a2237720f5974836a0c40e77da8451866bff2885d70637f'
|
||||||
'2142f1417536e2670829d3cf6f4f4f2560687a92955ccf11a121bde5dbbccbc9'
|
'8ce80150b6da67c551ffebb18650cfceef8d5e0eddbc848bcef20b8ec176af05')
|
||||||
'9ac1b3ac2ec7b1bf0709af047f2d7d2a34ccde353684e57c6b47ebca77d7a376'
|
|
||||||
'SKIP'
|
|
||||||
'8747c92c35d5db32eae99af66f17b384abaca961653e185677f9c9a571ed2d58'
|
|
||||||
'SKIP'
|
|
||||||
'9e43aa93378c7e9f7001d8174b1beb948deefa6799b6f581673f465b7d9d4780'
|
|
||||||
'SKIP'
|
|
||||||
'f925683429f20973c552bff6702c74c58c2a38ff6e5cf305a8e847119c5a6b64'
|
|
||||||
'SKIP'
|
|
||||||
'ca159c83706541c6bbe39129a33d63bbd76ac594303f67e4d35678711c51b753'
|
|
||||||
'SKIP')
|
|
||||||
validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey
|
validpgpkeys=('7C0135FB088AAF6C66C650B9BB5869F064EA74AB') # Chet Ramey
|
||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
|
|||||||
@ -32,48 +32,57 @@ diff -Naur readline-6.3-orig/support/config.guess readline-6.3/support/config.gu
|
|||||||
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
|
+ amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
|
||||||
+ echo x86_64-unknown-msys
|
+ echo x86_64-unknown-msys
|
||||||
+ exit ;;
|
+ exit ;;
|
||||||
p*:CYGWIN*:*)
|
prep*:SunOS:5.*:*)
|
||||||
echo powerpcle-unknown-cygwin
|
echo powerpcle-unknown-solaris2"`echo "$UNAME_RELEASE"|sed -e 's/[^.]*//'`"
|
||||||
exit ;;
|
exit ;;
|
||||||
diff -Naur readline-6.3-orig/support/config.rpath readline-6.3/support/config.rpath
|
diff -Naur readline-6.3-orig/support/config.rpath readline-6.3/support/config.rpath
|
||||||
--- readline-6.3-orig/support/config.rpath 2008-08-20 17:21:09.000000000 +0400
|
--- readline-6.3-orig/support/config.rpath 2008-08-20 17:21:09.000000000 +0400
|
||||||
+++ readline-6.3/support/config.rpath 2014-02-28 06:55:23.493600000 +0400
|
+++ readline-6.3/support/config.rpath 2014-02-28 06:55:23.493600000 +0400
|
||||||
@@ -108,7 +108,7 @@
|
@@ -57,7 +57,7 @@
|
||||||
|
aix*)
|
||||||
|
wl='-Wl,'
|
||||||
|
;;
|
||||||
|
- mingw* | cygwin* | pw32* | os2* | cegcc*)
|
||||||
|
+ mingw* | cygwin* | msys* | pw32* | os2* | cegcc*)
|
||||||
|
;;
|
||||||
|
hpux9* | hpux10* | hpux11*)
|
||||||
|
wl='-Wl,'
|
||||||
|
@@ -149,7 +149,7 @@
|
||||||
hardcode_minus_L=no
|
hardcode_minus_L=no
|
||||||
|
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
- cygwin* | mingw* | pw32*)
|
- cygwin* | mingw* | pw32* | cegcc*)
|
||||||
+ cygwin* | msys* | mingw* | pw32*)
|
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||||
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
# FIXME: the MSVC++ port hasn't been tested in a loooong time
|
||||||
# When not using gcc, we currently assume that we are using
|
# When not using gcc, we currently assume that we are using
|
||||||
# Microsoft Visual C++.
|
# Microsoft Visual C++.
|
||||||
@@ -148,7 +148,7 @@
|
@@ -198,7 +198,7 @@
|
||||||
ld_shlibs=no
|
ld_shlibs=no
|
||||||
fi
|
fi
|
||||||
;;
|
;;
|
||||||
- cygwin* | mingw* | pw32*)
|
- cygwin* | mingw* | pw32* | cegcc*)
|
||||||
+ cygwin* | msys* | mingw* | pw32*)
|
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||||
# no search path for DLLs.
|
# no search path for DLLs.
|
||||||
hardcode_libdir_flag_spec='-L$libdir'
|
hardcode_libdir_flag_spec='-L$libdir'
|
||||||
@@ -267,7 +267,7 @@
|
@@ -348,7 +348,7 @@
|
||||||
;;
|
;;
|
||||||
bsdi4*)
|
bsdi[45]*)
|
||||||
;;
|
;;
|
||||||
- cygwin* | mingw* | pw32*)
|
- cygwin* | mingw* | pw32* | cegcc*)
|
||||||
+ cygwin* | msys* | mingw* | pw32*)
|
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||||
# When not using gcc, we currently assume that we are using
|
# When not using gcc, we currently assume that we are using
|
||||||
# Microsoft Visual C++.
|
# Microsoft Visual C++.
|
||||||
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
# hardcode_libdir_flag_spec is actually meaningless, as there is
|
||||||
@@ -439,7 +439,7 @@
|
@@ -533,7 +533,7 @@
|
||||||
|
bsdi[45]*)
|
||||||
|
library_names_spec='$libname$shrext'
|
||||||
;;
|
;;
|
||||||
bsdi4*)
|
- cygwin* | mingw* | pw32* | cegcc*)
|
||||||
;;
|
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
|
||||||
- cygwin* | mingw* | pw32*)
|
|
||||||
+ cygwin* | msys* | mingw* | pw32*)
|
|
||||||
shrext=.dll
|
shrext=.dll
|
||||||
|
library_names_spec='$libname.dll.a $libname.lib'
|
||||||
;;
|
;;
|
||||||
darwin* | rhapsody*)
|
|
||||||
diff -Naur readline-6.3-orig/support/shlib-install readline-6.3/support/shlib-install
|
diff -Naur readline-6.3-orig/support/shlib-install readline-6.3/support/shlib-install
|
||||||
--- readline-6.3-orig/support/shlib-install 2012-07-10 23:58:08.000000000 +0400
|
--- readline-6.3-orig/support/shlib-install 2012-07-10 23:58:08.000000000 +0400
|
||||||
+++ readline-6.3/support/shlib-install 2014-02-28 06:55:23.509200000 +0400
|
+++ readline-6.3/support/shlib-install 2014-02-28 06:55:23.509200000 +0400
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
diff -Naur readline-6.3-orig/kill.c readline-6.3/kill.c
|
diff -Naur readline-6.3-orig/kill.c readline-6.3/kill.c
|
||||||
--- readline-6.3-orig/kill.c 2010-12-07 01:44:58.000000000 +0100
|
--- readline-6.3-orig/kill.c 2010-12-07 01:44:58.000000000 +0100
|
||||||
+++ readline-6.3/kill.c 2015-12-17 20:08:50.652036500 +0100
|
+++ readline-6.3/kill.c 2015-12-17 20:08:50.652036500 +0100
|
||||||
@@ -660,17 +660,41 @@
|
@@ -660,16 +660,40 @@
|
||||||
#if defined (__CYGWIN__)
|
#if defined (_WIN32)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|
||||||
+static char*
|
+static char*
|
||||||
@ -27,8 +27,7 @@ diff -Naur readline-6.3-orig/kill.c readline-6.3/kill.c
|
|||||||
+}
|
+}
|
||||||
+
|
+
|
||||||
int
|
int
|
||||||
rl_paste_from_clipboard (count, key)
|
rl_paste_from_clipboard (int count, int key)
|
||||||
int count, key;
|
|
||||||
{
|
{
|
||||||
+ wchar_t *wdata;
|
+ wchar_t *wdata;
|
||||||
char *data, *ptr;
|
char *data, *ptr;
|
||||||
|
|||||||
@ -16,7 +16,7 @@ diff -rwu orig/kill.c readline-7.0/kill.c
|
|||||||
@@ -741,7 +741,7 @@
|
@@ -741,7 +741,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
/* A special paste command for Windows users.. */
|
/* A special paste command for Windows users. */
|
||||||
-#if defined (_WIN32)
|
-#if defined (_WIN32)
|
||||||
+#if defined (_WIN32) || defined (__CYGWIN__)
|
+#if defined (_WIN32) || defined (__CYGWIN__)
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
|
|||||||
@ -13,14 +13,14 @@
|
|||||||
--- origsrc/readline-7.0/examples/Makefile.in 2016-04-26 08:50:18.000000000 -0500
|
--- origsrc/readline-7.0/examples/Makefile.in 2016-04-26 08:50:18.000000000 -0500
|
||||||
+++ src/readline-7.0/examples/Makefile.in 2017-02-11 16:38:31.337560100 -0600
|
+++ src/readline-7.0/examples/Makefile.in 2017-02-11 16:38:31.337560100 -0600
|
||||||
@@ -54,7 +54,7 @@ CPPFLAGS = @CPPFLAGS@
|
@@ -54,7 +54,7 @@ CPPFLAGS = @CPPFLAGS@
|
||||||
INCLUDES = -I$(srcdir) -I$(top_srcdir) -I..
|
|
||||||
|
|
||||||
CCFLAGS = $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS)
|
CCFLAGS = $(ASAN_CFLAGS) $(DEFS) $(LOCAL_CFLAGS) $(INCLUDES) $(CPPFLAGS) \
|
||||||
-LDFLAGS = -g -L.. @LDFLAGS@
|
$(CFLAGS)
|
||||||
+LDFLAGS = -g -L../shlib -L.. @LDFLAGS@
|
-LDFLAGS = -g -L.. @LDFLAGS@ $(ASAN_LDFLAGS)
|
||||||
|
+LDFLAGS = -g -L../shlib -L.. @LDFLAGS@ $(ASAN_LDFLAGS)
|
||||||
|
|
||||||
READLINE_LIB = ../libreadline.a
|
ASAN_XCFLAGS = -fsanitize=address -fno-omit-frame-pointer
|
||||||
HISTORY_LIB = ../libhistory.a
|
ASAN_XLDFLAGS = -fsanitize=address
|
||||||
@@ -84,7 +84,7 @@ all: $(EXECUTABLES)
|
@@ -84,7 +84,7 @@ all: $(EXECUTABLES)
|
||||||
everything: all
|
everything: all
|
||||||
|
|
||||||
|
|||||||
@ -1,57 +0,0 @@
|
|||||||
READLINE PATCH REPORT
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Readline-Release: 7.0
|
|
||||||
Patch-ID: readline70-001
|
|
||||||
|
|
||||||
Bug-Reported-by: Sean Zha <freeman_cha@hotmail.com>
|
|
||||||
Bug-Reference-ID: <BN3PR01MB13657D9303EB94BF6E54216E8CCA0@BN3PR01MB1365.prod.exchangelabs.com>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2016-09/msg00107.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
Readline-7.0 changed the way the history list is initially allocated to reduce
|
|
||||||
the number of reallocations and copies. Users who set the readline
|
|
||||||
history-size variable to a very large number to essentially unlimit the size
|
|
||||||
of the history list will get memory allocation errors
|
|
||||||
|
|
||||||
Patch (apply with `patch -p0'):
|
|
||||||
|
|
||||||
*** ../readline-7.0/history.c 2015-12-28 13:50:31.000000000 -0500
|
|
||||||
--- history.c 2016-09-30 14:28:40.000000000 -0400
|
|
||||||
***************
|
|
||||||
*** 58,61 ****
|
|
||||||
--- 58,63 ----
|
|
||||||
#define DEFAULT_HISTORY_INITIAL_SIZE 502
|
|
||||||
|
|
||||||
+ #define MAX_HISTORY_INITIAL_SIZE 8192
|
|
||||||
+
|
|
||||||
/* The number of slots to increase the_history by. */
|
|
||||||
#define DEFAULT_HISTORY_GROW_SIZE 50
|
|
||||||
***************
|
|
||||||
*** 308,312 ****
|
|
||||||
{
|
|
||||||
if (history_stifled && history_max_entries > 0)
|
|
||||||
! history_size = history_max_entries + 2;
|
|
||||||
else
|
|
||||||
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
|
|
||||||
--- 310,316 ----
|
|
||||||
{
|
|
||||||
if (history_stifled && history_max_entries > 0)
|
|
||||||
! history_size = (history_max_entries > MAX_HISTORY_INITIAL_SIZE)
|
|
||||||
! ? MAX_HISTORY_INITIAL_SIZE
|
|
||||||
! : history_max_entries + 2;
|
|
||||||
else
|
|
||||||
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
|
|
||||||
|
|
||||||
*** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
|
|
||||||
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
|
|
||||||
***************
|
|
||||||
*** 1,3 ****
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 0
|
|
||||||
--- 1,3 ----
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 1
|
|
||||||
Binary file not shown.
@ -1,103 +0,0 @@
|
|||||||
READLINE PATCH REPORT
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Readline-Release: 7.0
|
|
||||||
Patch-ID: readline70-002
|
|
||||||
|
|
||||||
Bug-Reported-by: Hong Cho <hong.cho@citrix.com>
|
|
||||||
Bug-Reference-ID: <c30b5fe62b2543af8297e47ca487c29c@SJCPEX02CL02.citrite.net>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2016-12/msg00002.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
There is a race condition in add_history() that can be triggered by a fatal
|
|
||||||
signal arriving between the time the history length is updated and the time
|
|
||||||
the history list update is completed. A later attempt to reference an
|
|
||||||
invalid history entry can cause a crash.
|
|
||||||
|
|
||||||
Patch (apply with `patch -p0'):
|
|
||||||
|
|
||||||
*** ../readline-7.0-patched/history.c 2016-11-11 13:42:49.000000000 -0500
|
|
||||||
--- history.c 2016-12-05 10:37:51.000000000 -0500
|
|
||||||
***************
|
|
||||||
*** 280,283 ****
|
|
||||||
--- 280,284 ----
|
|
||||||
{
|
|
||||||
HIST_ENTRY *temp;
|
|
||||||
+ int new_length;
|
|
||||||
|
|
||||||
if (history_stifled && (history_length == history_max_entries))
|
|
||||||
***************
|
|
||||||
*** 296,306 ****
|
|
||||||
/* Copy the rest of the entries, moving down one slot. Copy includes
|
|
||||||
trailing NULL. */
|
|
||||||
- #if 0
|
|
||||||
- for (i = 0; i < history_length; i++)
|
|
||||||
- the_history[i] = the_history[i + 1];
|
|
||||||
- #else
|
|
||||||
memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *));
|
|
||||||
- #endif
|
|
||||||
|
|
||||||
history_base++;
|
|
||||||
}
|
|
||||||
--- 297,303 ----
|
|
||||||
/* Copy the rest of the entries, moving down one slot. Copy includes
|
|
||||||
trailing NULL. */
|
|
||||||
memmove (the_history, the_history + 1, history_length * sizeof (HIST_ENTRY *));
|
|
||||||
|
|
||||||
+ new_length = history_length;
|
|
||||||
history_base++;
|
|
||||||
}
|
|
||||||
***************
|
|
||||||
*** 316,320 ****
|
|
||||||
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
|
|
||||||
the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
|
|
||||||
! history_length = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
--- 313,317 ----
|
|
||||||
history_size = DEFAULT_HISTORY_INITIAL_SIZE;
|
|
||||||
the_history = (HIST_ENTRY **)xmalloc (history_size * sizeof (HIST_ENTRY *));
|
|
||||||
! new_length = 1;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
***************
|
|
||||||
*** 326,330 ****
|
|
||||||
xrealloc (the_history, history_size * sizeof (HIST_ENTRY *));
|
|
||||||
}
|
|
||||||
! history_length++;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
--- 323,327 ----
|
|
||||||
xrealloc (the_history, history_size * sizeof (HIST_ENTRY *));
|
|
||||||
}
|
|
||||||
! new_length = history_length + 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
***************
|
|
||||||
*** 332,337 ****
|
|
||||||
temp = alloc_history_entry ((char *)string, hist_inittime ());
|
|
||||||
|
|
||||||
! the_history[history_length] = (HIST_ENTRY *)NULL;
|
|
||||||
! the_history[history_length - 1] = temp;
|
|
||||||
}
|
|
||||||
|
|
||||||
--- 329,335 ----
|
|
||||||
temp = alloc_history_entry ((char *)string, hist_inittime ());
|
|
||||||
|
|
||||||
! the_history[new_length] = (HIST_ENTRY *)NULL;
|
|
||||||
! the_history[new_length - 1] = temp;
|
|
||||||
! history_length = new_length;
|
|
||||||
}
|
|
||||||
|
|
||||||
*** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
|
|
||||||
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
|
|
||||||
***************
|
|
||||||
*** 1,3 ****
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 1
|
|
||||||
--- 1,3 ----
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 2
|
|
||||||
Binary file not shown.
@ -1,40 +0,0 @@
|
|||||||
READLINE PATCH REPORT
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Readline-Release: 7.0
|
|
||||||
Patch-ID: readline70-003
|
|
||||||
|
|
||||||
Bug-Reported-by: Frédéric Brière <fbriere@fbriere.net>
|
|
||||||
Bug-Reference-ID: <20170120180724.7ydq7fb2hsp366dj@fabul.fbriere.net>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-readline/2017-01/msg00002.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
Readline-7.0 uses pselect(2) to allow readline to handle signals that do not
|
|
||||||
interrupt read(2), such as SIGALRM, before reading another character. The
|
|
||||||
signal mask used in the pselect call did not take into account signals the
|
|
||||||
calling application blocked before calling readline().
|
|
||||||
|
|
||||||
Patch (apply with `patch -p0'):
|
|
||||||
|
|
||||||
*** ../readline-7.0-patched/input.c 2016-08-30 10:21:47.000000000 -0400
|
|
||||||
--- input.c 2017-01-23 10:21:56.000000000 -0500
|
|
||||||
***************
|
|
||||||
*** 514,517 ****
|
|
||||||
--- 514,518 ----
|
|
||||||
#if defined (HAVE_PSELECT)
|
|
||||||
sigemptyset (&empty_set);
|
|
||||||
+ sigprocmask (SIG_BLOCK, (sigset_t *)NULL, &empty_set);
|
|
||||||
FD_ZERO (&readfds);
|
|
||||||
FD_SET (fileno (stream), &readfds);
|
|
||||||
*** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
|
|
||||||
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
|
|
||||||
***************
|
|
||||||
*** 1,3 ****
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 2
|
|
||||||
--- 1,3 ----
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 3
|
|
||||||
Binary file not shown.
@ -1,47 +0,0 @@
|
|||||||
READLINE PATCH REPORT
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Readline-Release: 7.0
|
|
||||||
Patch-ID: readline70-004
|
|
||||||
|
|
||||||
Bug-Reported-by: Kieran Grant <kieran.thehacker.grant@gmail.com>
|
|
||||||
Bug-Reference-ID: <ec9071ae-efb1-9e09-5d03-e905daf2835c@gmail.com>
|
|
||||||
Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2018-02/msg00002.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
With certain values for PS1, especially those that wrap onto three or more
|
|
||||||
lines, readline will miscalculate the number of invisible characters,
|
|
||||||
leading to crashes and core dumps.
|
|
||||||
|
|
||||||
Patch (apply with `patch -p0'):
|
|
||||||
|
|
||||||
*** ../readline-7.0.3/display.c 2016-07-28 14:49:33.000000000 -0400
|
|
||||||
--- display.c 2018-02-03 19:19:35.000000000 -0500
|
|
||||||
***************
|
|
||||||
*** 772,776 ****
|
|
||||||
wadjust = (newlines == 0)
|
|
||||||
? prompt_invis_chars_first_line
|
|
||||||
! : ((newlines == prompt_lines_estimate) ? wrap_offset : prompt_invis_chars_first_line);
|
|
||||||
|
|
||||||
/* fix from Darin Johnson <darin@acuson.com> for prompt string with
|
|
||||||
--- 788,794 ----
|
|
||||||
wadjust = (newlines == 0)
|
|
||||||
? prompt_invis_chars_first_line
|
|
||||||
! : ((newlines == prompt_lines_estimate)
|
|
||||||
! ? (wrap_offset - prompt_invis_chars_first_line)
|
|
||||||
! : 0);
|
|
||||||
|
|
||||||
/* fix from Darin Johnson <darin@acuson.com> for prompt string with
|
|
||||||
*** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
|
|
||||||
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
|
|
||||||
***************
|
|
||||||
*** 1,3 ****
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 3
|
|
||||||
--- 1,3 ----
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 4
|
|
||||||
|
|
||||||
Binary file not shown.
@ -1,58 +0,0 @@
|
|||||||
READLINE PATCH REPORT
|
|
||||||
=====================
|
|
||||||
|
|
||||||
Readline-Release: 7.0
|
|
||||||
Patch-ID: readline70-005
|
|
||||||
|
|
||||||
Bug-Reported-by: Nuzhna Pomoshch <nuzhna_pomoshch@yahoo.com>
|
|
||||||
Bug-Reference-ID: <1317167476.1492079.1495999776464@mail.yahoo.com>
|
|
||||||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2017-05/msg00005.html
|
|
||||||
|
|
||||||
Bug-Description:
|
|
||||||
|
|
||||||
There are cases where a failing readline command (e.g., delete-char at the end
|
|
||||||
of a line) can cause a multi-character key sequence to `back up' and attempt
|
|
||||||
to re-read some of the characters in the sequence.
|
|
||||||
|
|
||||||
Patch (apply with `patch -p0'):
|
|
||||||
|
|
||||||
*** ../readline-7.0/readline.c 2016-04-20 15:53:52.000000000 -0400
|
|
||||||
--- readline.c 2018-05-26 17:19:00.000000000 -0400
|
|
||||||
***************
|
|
||||||
*** 1058,1062 ****
|
|
||||||
r = _rl_dispatch (ANYOTHERKEY, m);
|
|
||||||
}
|
|
||||||
! else if (r && map[ANYOTHERKEY].function)
|
|
||||||
{
|
|
||||||
/* We didn't match (r is probably -1), so return something to
|
|
||||||
--- 1056,1060 ----
|
|
||||||
r = _rl_dispatch (ANYOTHERKEY, m);
|
|
||||||
}
|
|
||||||
! else if (r < 0 && map[ANYOTHERKEY].function)
|
|
||||||
{
|
|
||||||
/* We didn't match (r is probably -1), so return something to
|
|
||||||
***************
|
|
||||||
*** 1070,1074 ****
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
! else if (r && got_subseq)
|
|
||||||
{
|
|
||||||
/* OK, back up the chain. */
|
|
||||||
--- 1068,1072 ----
|
|
||||||
return -2;
|
|
||||||
}
|
|
||||||
! else if (r < 0 && got_subseq) /* XXX */
|
|
||||||
{
|
|
||||||
/* OK, back up the chain. */
|
|
||||||
*** ../readline-7.0/patchlevel 2013-11-15 08:11:11.000000000 -0500
|
|
||||||
--- patchlevel 2014-03-21 08:28:40.000000000 -0400
|
|
||||||
***************
|
|
||||||
*** 1,3 ****
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 4
|
|
||||||
--- 1,3 ----
|
|
||||||
# Do not edit -- exists only for use by patch
|
|
||||||
|
|
||||||
! 5
|
|
||||||
|
|
||||||
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user