Re: Segfault, 29 May '23

2023-06-02 Thread Chet Ramey

On 5/30/23 1:17 AM, Wiley Young wrote:

Hi,
   While trying to capture line numbers in an array to print with the rest
of the shell's debugging info, a segfault ..
   Wiley


Thanks for the report. This will be fixed in the next devel branch push.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/




Segfault, 29 May '23

2023-05-29 Thread Wiley Young
Hi,
  While trying to capture line numbers in an array to print with the rest
of the shell's debugging info, a segfault ..
  Wiley

[liveuser@localhost-live]$ bash
...
$ set -x
+ set -x
$ echo $SHLVL
+ echo 2
2
$ declare -n n=BASH_SOURCE; declare -n e=LINENO; shopt -s expand_aliases
+ declare -n n=BASH_SOURCE
+ declare -n e=LINENO
+ shopt -s expand_aliases
$ alias L_='"l[8-${#n[@]}]+=$e"; m=("${l[@]}")'
+ alias 'L_="l[8-${#n[@]}]+=$e"; m=("${l[@]}")'
$ L_
+ 'l[8-0]+=10'
bash: l[8-0]+=10: command not found
+ m=("${l[@]}")
Segmentation fault (core dumped)
[liveuser@localhost-live]$ echo $SHLVL
1