bug-bash
[Top][All Lists]
Advanced

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

Re: Wrong 'declare -A' causes segfault


From: Chet Ramey
Subject: Re: Wrong 'declare -A' causes segfault
Date: Wed, 25 Nov 2009 19:47:11 -0500
User-agent: Thunderbird 2.0.0.23 (Macintosh/20090812)

Bernd Eggink wrote:
> GNU bash, version 4.0.35(1)-release (i686-pc-linux-gnu)
> 
> The following syntactically wrong declaration causes a segmentation fault:
> 
>     declare -A x=y
> 
> It should issue an error message instead.

It's not actually a syntax error.  It should assign an element with key
"0", like an indexed array assigns an element with index 0.  This will
be fixed in bash-4.1.

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




reply via email to

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