Re: [PATCH] Fix foreground dead jobs in trap handlers reported like background ones in `jobs'

2022-09-30 Thread Chet Ramey
On 7/17/22 11:52 PM, Koichi Murase wrote: Bash Version: 5.1.4, also in the current devel 87a6e89e Description: In interactive shells, the foreground dead jobs (i.e., foreground jobs that have already terminated) in trap handlers, commands called through `bind -x', and `PROMPT_COMMAND'

Re: (( arr[${var@Q}] )) makes the shell crash in bash-5.2

2022-09-30 Thread Chet Ramey
On 9/30/22 7:15 AM, Koichi Murase wrote: 2022年9月30日(金) 19:50 Koichi Murase : 2022年9月30日(金) 19:37 Emanuele Torre : In bash-5.2, using the ${parameter@Q} parameter expansion with an unset parameter, in an array subscript, in an arithmetic context, causes a segmentation fault. It seems even ((y[

Re: PEs in arithmetic context array subscript cause SEGFAULT (was: (( arr[${var@Q}] )) makes the shell crash in bash-5.2)

2022-09-30 Thread Chet Ramey
On 9/30/22 6:41 AM, Emanuele Torre wrote: On 30/09/2022, Emanuele Torre wrote: In bash-5.2, using the ${parameter@Q} parameter expansion with an unset parameter, in an array subscript, in an arithmetic context, causes a segmentation fault. Actually, using any parameter expansion with an unset

Re: [PATCH] fix build with --disable-array-vars

2022-09-30 Thread Emanuele Torre
oops, sorry. ignore this email. On 30/09/2022, Emanuele Torre wrote: > --- > execute_cmd.c | 9 - > 1 file changed, 8 insertions(+), 1 deletion(-) > > diff --git a/execute_cmd.c b/execute_cmd.c > index d0d1dd31..4d0fdcf7 100644 > --- a/execute_cmd.c > +++ b/execute_cmd.c > @@ -3901,7 +39

[PATCH] fix build with --disable-array-vars

2022-09-30 Thread Emanuele Torre
--- execute_cmd.c | 9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/execute_cmd.c b/execute_cmd.c index d0d1dd31..4d0fdcf7 100644 --- a/execute_cmd.c +++ b/execute_cmd.c @@ -3901,7 +3901,10 @@ execute_cond_node (cond) } else if (cond->type == COND_UNARY) { -

Re: (( arr[${var@Q}] )) makes the shell crash in bash-5.2

2022-09-30 Thread Koichi Murase
2022年9月30日(金) 19:50 Koichi Murase : > 2022年9月30日(金) 19:37 Emanuele Torre : > > In bash-5.2, using the ${parameter@Q} parameter expansion with an unset > > parameter, in an array subscript, in an arithmetic context, causes a > > segmentation fault. > > It seems even ((y[$a])) in arithmetic contexts

Re: (( arr[${var@Q}] )) makes the shell crash in bash-5.2

2022-09-30 Thread Koichi Murase
2022年9月30日(金) 19:37 Emanuele Torre : > In bash-5.2, using the ${parameter@Q} parameter expansion with an unset > parameter, in an array subscript, in an arithmetic context, causes a > segmentation fault. It seems even ((y[$a])) in arithmetic contexts causes a segfault: $ bash-5.2 -c '((y[$a]))' S

PEs in arithmetic context array subscript cause SEGFAULT (was: (( arr[${var@Q}] )) makes the shell crash in bash-5.2)

2022-09-30 Thread Emanuele Torre
On 30/09/2022, Emanuele Torre wrote: > In bash-5.2, using the ${parameter@Q} parameter expansion with an unset > parameter, in an array subscript, in an arithmetic context, causes a > segmentation fault. Actually, using any parameter expansion with an unset parameter in an array subscript causes

(( arr[${var@Q}] )) makes the shell crash in bash-5.2

2022-09-30 Thread Emanuele Torre
In bash-5.2, using the ${parameter@Q} parameter expansion with an unset parameter, in an array subscript, in an arithmetic context, causes a segmentation fault. bash-5.1$ ./bash --norc bash-5.2$ (x[y[${a@Q}]]=) Segmentation fault (core dumped) bash-5.2$ ( (( y[${a@Q}] )) ) Seg