Re: segfault expanding certain arrays created via read -N directly to an array.

2011-12-19 Thread Chet Ramey
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 12/19/11 11:12 AM, Dan Douglas wrote: > Hi, This seems to corrupt the array in a way that crashes when trying to > expand the array. Also occurs with the previous patchset. > > ~ $ ( while read -rn 1 'x[y++]'; do :; done < <(printf '%s\n' {0..5});

segfault expanding certain arrays created via read -N directly to an array.

2011-12-19 Thread Dan Douglas
Hi, This seems to corrupt the array in a way that crashes when trying to expand the array. Also occurs with the previous patchset. ~ $ ( while read -rn 1 'x[y++]'; do :; done < <(printf '%s\n' {0..5}); declare -p x; echo "${x[@]}" ) declare -a x='([0]="0" [1]="" [2]="1" [3]="" [4]="2" [5]="" [6]