Description of problem: Here is simple bash script which used to work in pre 4.3 era: (Noticed from failing lvm2 test suite) -- #!/bin/bash pass_() { declare -a var=("${!1}") echo "Size ${#var[*]}" printf "%s\n" "${var[@]}" } var=( "a" ) pass_ "var[@]" -- Output with 4.3: Size 0 -- Output with bash-4.2.45-6.fc21.x86_64 Size 1 a -- Obvious workaround is to use different name with 'declare -a var' but looks like serious regression in variable name processing in bash Version-Release number of selected component (if applicable): bash-4.3.0-1.fc21.x86_64 How reproducible: Steps to Reproduce: 1. 2. 3. Actual results: Expected results: Additional info:
Thank you for reporting this. A similar issue (if I'm not mistaken) was already reported on the upstream ML - http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00049.html . It doesn't seem like a deliberate regression, so hopefully it'll catch their attention soon.
Although a regression, this now seems to be the correct behaviour and won't be changed back. Please see [1] for a solution/rationale of this problem. [1] http://lists.gnu.org/archive/html/bug-bash/2014-03/msg00052.html