bug-bash
[Top][All Lists]
Advanced

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

Re: segfault evaluating [[ $@ ]] when IFS is \t or \n and $1 == $IFS


From: Chet Ramey
Subject: Re: segfault evaluating [[ $@ ]] when IFS is \t or \n and $1 == $IFS
Date: Fri, 7 Apr 2017 19:01:07 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.0

On 4/4/17 7:54 PM, Grisha Levit wrote:
> Given:
> 
> set -- $'\t'; IFS=$1 A=$1   # or set -- $'\n'
> 
> These all segfault (in different places with -DDEBUG)
> 
> : ${x-$@}
> [[ $@ ]]
> : ${x-${A[@]}}
> [[ ${A[@]} ]]

Thanks for the report.  This was a little bit tricker to fix than I thought
it would be.

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



reply via email to

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