Re: recent typo in sig.c breaks Minix compilation

2024-10-18 Thread Chet Ramey
On 10/17/24 9:15 PM, Martin D Kealey wrote: It looks like a recent (last year) typo in sig.c breaks Minix compilation: Thanks. Talking of which, I note several places where there's a construct like: #ifdef FOO if (foo && zot) #else if (zot) #endif Unfortunately this con

Re: recent typo in sig.c breaks Minix compilation

2024-10-18 Thread Oğuz
On Friday, October 18, 2024, Martin D Kealey wrote: > > The problematic code for editors looks like this: > > #ifdef FOO > if (foo && zot) { > #else > if (bar && zot) { > #endif > > Vim certainly does not like this, > How about this: #ifdef FOO if (foo && zot) #else if (bar && zot) #endif { --

[PATCH] isearch: fix with HANDLE_MULTIBYTE && LC_ALL=C

2024-10-18 Thread Grisha Levit
Sorry, previous patch should have been: --- lib/readline/isearch.c | 7 --- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/readline/isearch.c b/lib/readline/isearch.c index 9ddf9ce3..c6d8c8a8 100644 --- a/lib/readline/isearch.c +++ b/lib/readline/isearch.c @@ -742,10 +742,11

[PATCH] isearch: fix with HANDLE_MULTIBYTE && LC_ALL=C

2024-10-18 Thread Grisha Levit
HISTFILE= INPUTRC=/ LC_ALL=C bash --norc -in <<< $'\cR.' WARNING: MemorySanitizer: use-of-uninitialized-value #0 _rl_isearch_dispatch isearch.c:745:31 #1 rl_search_historyisearch.c:926:11 #2 rl_reverse_search_historyisearch.c:135:11 #3 _rl_dispatch_subse

Re: [PATCH] histfile: fix mmap page alignment

2024-10-18 Thread Chet Ramey
On 10/17/24 8:27 PM, Grisha Levit wrote: The mmap in history_do_write would usually fail when appending because the offset must be a multiple of the page size. Thanks for the report. Not everyone requires this, but since some systems do, it's better to do this for portability. -- ``The lyf so

Re: recent typo in sig.c breaks Minix compilation

2024-10-18 Thread Martin D Kealey
On Fri, 18 Oct 2024, 13:09 Oğuz, wrote: > On Friday, October 18, 2024, Martin D Kealey > wrote: >> >> Talking of which, I note several places where there's a construct like: >> >> #ifdef FOO >> > if (foo && zot) >> > #else >> > if (zot) >> > #endif >> >> >> Unfortunately this confuses both the i

Re: [PATCH] histfile: fix mmap page alignment

2024-10-18 Thread Chet Ramey
On 10/18/24 12:19 PM, Grisha Levit wrote: On Fri, Oct 18, 2024 at 12:15 PM Chet Ramey wrote: On 10/18/24 11:51 AM, Chet Ramey wrote: On 10/17/24 8:27 PM, Grisha Levit wrote: The mmap in history_do_write would usually fail when appending because the offset must be a multiple of the page size.

Re: [PATCH] histfile: fix mmap page alignment

2024-10-18 Thread Grisha Levit
On Fri, Oct 18, 2024 at 12:15 PM Chet Ramey wrote: > > On 10/18/24 11:51 AM, Chet Ramey wrote: > > On 10/17/24 8:27 PM, Grisha Levit wrote: > >> The mmap in history_do_write would usually fail when appending because > >> the offset must be a multiple of the page size. > > > > Thanks for the report

Re: [PATCH] histfile: fix mmap page alignment

2024-10-18 Thread Chet Ramey
On 10/18/24 11:51 AM, Chet Ramey wrote: On 10/17/24 8:27 PM, Grisha Levit wrote: The mmap in history_do_write would usually fail when appending because the offset must be a multiple of the page size. Thanks for the report. Not everyone requires this, but since some systems do, it's better to d

Re: [PATCH] rl_tilde_expand: avoid uninitialized memory use

2024-10-18 Thread Chet Ramey
On 10/18/24 1:14 AM, Grisha Levit wrote: $ bash --norc -in <<< $'\e&' WARNING: MemorySanitizer: use-of-uninitialized-value #0 rl_tilde_expand lib/readline/util.c:208:10 Thanks for the report. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars

Re: IFS whitespace definition

2024-10-18 Thread Chet Ramey
On 10/17/24 6:44 PM, Greg Wooledge wrote: This issue came up on the Libera #bash IRC channel today: Between bash 4.4 and 5.0, the definition of "IFS whitespace" has apparently been expanded: POSIX defines whitespace as a character in the current locale's `space' character class, or a byte for

history-search-* and undo lists

2024-10-18 Thread Grisha Levit
There's some issue with undo list handling in history-search-* commands: Doing a successful search with a line that has an undo list causes the undo entries from that list to leaked: HISTFILE= INPUTRC=/ bash --norc -in <<< $'X\nX\e[5~' =

Re: IFS whitespace definition

2024-10-18 Thread Chet Ramey
On 10/17/24 10:33 PM, Robert Elz wrote: Date:Thu, 17 Oct 2024 18:44:59 -0400 From:Greg Wooledge Message-ID: | Between bash 4.4 and 5.0, the definition of "IFS whitespace" has apparently | been expanded: Not going to comment on bash, or its manual, specifi