-
Notifications
You must be signed in to change notification settings - Fork 30
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Build against readline 8.2 (patch-level 13)
The latest readline patches where released on 2 August 2024. Bump the package version number to an alpha release.
- Loading branch information
1 parent
bddf94b
commit 5d557f4
Showing
5 changed files
with
406 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
READLINE PATCH REPORT | ||
===================== | ||
|
||
Readline-Release: 8.2 | ||
Patch-ID: readline82-011 | ||
|
||
Bug-Reported-by: Grisha Levit <grishalevit@gmail.com> | ||
Bug-Reference-ID: <CAMu=BrqWa_iNkiEwchpFmtrUhFrAanOO8pjy7VCKqRKUvqdsbw@mail.gmail.com> | ||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-bash/2024-02/msg00075.html | ||
|
||
Bug-Description: | ||
|
||
Patch (apply with `patch -p0'): | ||
|
||
Some systems (e.g., macOS) send signals early on in interactive initialization, | ||
so readline should retry a failed open of the init file. | ||
|
||
*** ../readline-8.2-patched/bind.c Wed Feb 9 11:02:22 2022 | ||
--- bind.c Tue Apr 23 15:07:13 2024 | ||
*************** | ||
*** 979,987 **** | ||
int i, file; | ||
|
||
! file = -1; | ||
! if (((file = open (filename, O_RDONLY, 0666)) < 0) || (fstat (file, &finfo) < 0)) | ||
{ | ||
if (file >= 0) | ||
close (file); | ||
return ((char *)NULL); | ||
} | ||
--- 969,986 ---- | ||
int i, file; | ||
|
||
! file = open (filename, O_RDONLY, 0666); | ||
! /* If the open is interrupted, retry once */ | ||
! if (file < 0 && errno == EINTR) | ||
{ | ||
+ RL_CHECK_SIGNALS (); | ||
+ file = open (filename, O_RDONLY, 0666); | ||
+ } | ||
+ | ||
+ if ((file < 0) || (fstat (file, &finfo) < 0)) | ||
+ { | ||
+ i = errno; | ||
if (file >= 0) | ||
close (file); | ||
+ errno = i; | ||
return ((char *)NULL); | ||
} | ||
*************** | ||
*** 992,999 **** | ||
--- 991,1001 ---- | ||
if (file_size != finfo.st_size || file_size + 1 < file_size) | ||
{ | ||
+ i = errno; | ||
if (file >= 0) | ||
close (file); | ||
#if defined (EFBIG) | ||
errno = EFBIG; | ||
+ #else | ||
+ errno = i; | ||
#endif | ||
return ((char *)NULL); | ||
|
||
*** ../readline-8.2/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 | ||
|
||
! 10 | ||
--- 1,3 ---- | ||
# Do not edit -- exists only for use by patch | ||
|
||
! 11 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
READLINE PATCH REPORT | ||
===================== | ||
|
||
Readline-Release: 8.2 | ||
Patch-ID: readline82-012 | ||
|
||
Bug-Reported-by: Grisha Levit <grishalevit@gmail.com> | ||
Bug-Reference-ID: <CAMu=BroaH+41uumYt89FPqt8Fsatj-d6mZzmPV2HZYjtcbvbvw@mail.gmail.com> | ||
Bug-Reference-URL: https://lists.gnu.org/archive/html/bug-readline/2023-11/msg00019.html | ||
|
||
Bug-Description: | ||
|
||
If a user happens to bind do-lowercase-version to something that isn't a | ||
capital letter, so _rl_to_lower doesn't change anything and the result is | ||
still bound to do-lowercase-version, readline can recurse infinitely. | ||
|
||
Patch (apply with `patch -p0'): | ||
|
||
*** ../readline-8.2-patched/readline.c Thu Aug 11 18:35:37 2022 | ||
--- readline.c Fri Feb 2 12:05:36 2024 | ||
*************** | ||
*** 900,905 **** | ||
/* Special case rl_do_lowercase_version (). */ | ||
if (func == rl_do_lowercase_version) | ||
! /* Should we do anything special if key == ANYOTHERKEY? */ | ||
! return (_rl_dispatch (_rl_to_lower ((unsigned char)key), map)); | ||
|
||
rl_executing_keymap = map; | ||
--- 912,926 ---- | ||
/* Special case rl_do_lowercase_version (). */ | ||
if (func == rl_do_lowercase_version) | ||
! { | ||
! /* Should we do anything special if key == ANYOTHERKEY? */ | ||
! newkey = _rl_to_lower ((unsigned char)key); | ||
! if (newkey != key) | ||
! return (_rl_dispatch (newkey, map)); | ||
! else | ||
! { | ||
! rl_ding (); /* gentle failure */ | ||
! return 0; | ||
! } | ||
! } | ||
|
||
rl_executing_keymap = map; | ||
*************** | ||
*** 1110,1114 **** | ||
func = m[ANYOTHERKEY].function; | ||
if (type == ISFUNC && func == rl_do_lowercase_version) | ||
! r = _rl_dispatch (_rl_to_lower ((unsigned char)key), map); | ||
else if (type == ISFUNC) | ||
{ | ||
--- 1131,1139 ---- | ||
func = m[ANYOTHERKEY].function; | ||
if (type == ISFUNC && func == rl_do_lowercase_version) | ||
! { | ||
! int newkey = _rl_to_lower ((unsigned char)key); | ||
! /* check that there is actually a lowercase version to avoid infinite recursion */ | ||
! r = (newkey != key) ? _rl_dispatch (newkey, map) : 1; | ||
! } | ||
else if (type == ISFUNC) | ||
{ | ||
|
||
*** ../readline-8.2-patched/isearch.c Thu Aug 11 18:35:37 2022 | ||
--- isearch.c Fri Feb 2 12:05:36 2024 | ||
*************** | ||
*** 429,433 **** | ||
f = cxt->keymap[c].function; | ||
if (f == rl_do_lowercase_version) | ||
! f = cxt->keymap[_rl_to_lower (c)].function; | ||
} | ||
|
||
--- 431,439 ---- | ||
f = cxt->keymap[c].function; | ||
if (f == rl_do_lowercase_version) | ||
! { | ||
! f = cxt->keymap[_rl_to_lower (c)].function; | ||
! if (f == rl_do_lowercase_version) | ||
! f = rl_insert; | ||
! } | ||
} | ||
|
||
|
||
*** ../readline-8.2/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 | ||
|
||
! 11 | ||
--- 1,3 ---- | ||
# Do not edit -- exists only for use by patch | ||
|
||
! 12 |
Oops, something went wrong.