Re: Bash 5.2.0: Memory leak with $(

2024-01-11 Thread pourko--- via Bug reports for the GNU Bourne Again SHell
Jan 10, 2024, 15:58 by grishale...@gmail.com: > On Mon, Jan 8, 2024, 12:26 <> pou...@tutanota.com> > wrote: > >> Do any of the other six patches in that report also apply to Bash 5.2? >> > > Yes, all but the one for the `kv' builtin which did not exist yet. See > attached. > >> >> Nice! Will th

Re: bash-4-2 issue

2024-01-11 Thread Sam Kappen via Bug reports for the GNU Bourne Again SHell
On Thu, Jan 11, 2024 at 1:03 AM Grisha Levit wrote: > On Wed, Jan 10, 2024 at 5:33 PM Grisha Levit > wrote: > > I'm not sure this is fixed. In all versions, including 4.2 [...] > > > > $ bash -m -c 'trap /usr/bin/true DEBUG; :|:' > > bash: child setpgid (49581 to 49579): Operation not pe

Re: document that read built-in can't return zero-length string in the middle of input

2024-01-11 Thread Chet Ramey
On 1/11/24 2:37 AM, ilya Basin wrote: Dear. I needed to read 16 bytes from a binary file and tried to replace a hexdump call with read built-in. I expected that with "-N1" if a NUL character is encountered bash would assign an empty string, however there's no indication that a NUL character was

Re: bash-4-2 issue

2024-01-11 Thread Chet Ramey
On 1/10/24 5:33 PM, Grisha Levit wrote: On Mon, Jan 8, 2024 at 7:04 AM Sam Kappen via Bug reports for the GNU Bourne Again SHell wrote: We see that bash throws the "Operation not permitted" error when doing chained pipe operation along with a debug trap. We set a debug trap here "my_debug" to

Re: bash-4-2 issue

2024-01-11 Thread Chet Ramey
On 1/11/24 3:46 AM, Sam Kappen via Bug reports for the GNU Bourne Again SHell wrote: Thanks. I am using a Linux host with kernel version 4.x for cross building. It looks like autoconf is not defining the "PGRP_PIPE" macro variable as there is no check for linux kernel version 4. The uname ch

Re: document that read built-in can't return zero-length string in the middle of input

2024-01-11 Thread Greg Wooledge
On Thu, Jan 11, 2024 at 09:29:03AM -0500, Chet Ramey wrote: > The read builtin skips over NUL characters because you can't store them > as part of the value of a shell variable. That seems obvious. I would argue that it's not obvious at all when using -N. The help text for -N says "return only af

Re: document that read built-in can't return zero-length string in the middle of input

2024-01-11 Thread alex xmb sw ratchev
On Thu, Jan 11, 2024, 15:29 Chet Ramey wrote: > On 1/11/24 2:37 AM, ilya Basin wrote: > > Dear. > > I needed to read 16 bytes from a binary file and tried to replace a > hexdump call with read built-in. I expected that with "-N1" if a NUL > character is encountered bash would assign an empty stri

Re: bash-4-2 issue

2024-01-11 Thread Chet Ramey
On 1/11/24 10:55 AM, Chet Ramey wrote: On 1/11/24 3:46 AM, Sam Kappen via Bug reports for the GNU Bourne Again SHell wrote: Thanks. I am using a Linux host with kernel version 4.x for cross building. It looks like autoconf is not defining the "PGRP_PIPE" macro variable as there is no check fo

Re: completion very slow with gigantic list

2024-01-11 Thread Chet Ramey
On 1/10/24 12:28 AM, Eric Wong wrote: Hi, I noticed bash struggles with gigantic completion lists (100k items of ~70 chars each) It's reproducible with both LANG+LC_ALL set to en_US.UTF-8 and C, so it's not just locales slowing things down. This happens on the up-to-date `devel' branch (commit

Re: completion very slow with gigantic list

2024-01-11 Thread alex xmb sw ratchev
On Thu, Jan 11, 2024, 23:21 Chet Ramey wrote: > On 1/10/24 12:28 AM, Eric Wong wrote: > > Hi, I noticed bash struggles with gigantic completion lists > > (100k items of ~70 chars each) > > > > It's reproducible with both LANG+LC_ALL set to en_US.UTF-8 and C, > > so it's not just locales slowing t

Re: document that read built-in can't return zero-length string in the middle of input

2024-01-11 Thread Ángel
On 2024-01-11 at 09:29 -0500, Chet Ramey wrote: > On 1/11/24 2:37 AM, ilya Basin wrote: > > Dear. > > I needed to read 16 bytes from a binary file and tried to replace a > hexdump call with read built-in. I expected that with "-N1" if a NUL > character is encountered bash would assign an empty stri

Re: document that read built-in can't return zero-length string in the middle of input

2024-01-11 Thread Greg Wooledge
On Fri, Jan 12, 2024 at 01:29:19AM +0100, Ángel wrote: > One might say "reading exactly nchars characters into the name", I would still find that confusing. What actually counts is how many characters are *stored* in the variable, not how many characters are *read* from the input. > but > given

Re: document that read built-in can't return zero-length string in the middle of input

2024-01-11 Thread Greg Wooledge
On Thu, Jan 11, 2024 at 08:02:04PM -0500, Greg Wooledge wrote: > And this for the help text: > > -N nchars return only after storing exactly NCHARS characters, unless >EOF is encountered or read times out, ignoring any NUL or >delimiter characters Actually, th