bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PEs in arithmetic context array subscript cause SEGFAULT (was: (( arr[${


From: Emanuele Torre
Subject: PEs in arithmetic context array subscript cause SEGFAULT (was: (( arr[${var@Q}] )) makes the shell crash in bash-5.2)
Date: Fri, 30 Sep 2022 12:41:41 +0200

On 30/09/2022, Emanuele Torre <torreemanuele6@gmail.com> 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 a segmentation fault:

    bash-5.2$ ($[x[${a#}]])
    Segmentation fault (core dumped)

I forgot to mention that I was able to reproduce this in both the latest
bash release version ( 5.2.0(1)-release ), and the version of the most
recent commit on the devel branch
( e6dc31ac13b8794be62571bca654303cd6a84516 ).

 emanuele6



reply via email to

[Prev in Thread] Current Thread [Next in Thread]