117-upstream-bash43-017.patch (1273B)
1 BASH PATCH REPORT 2 ================= 3 4 Bash-Release: 4.3 5 Patch-ID: bash43-017 6 7 Bug-Reported-by: Dan Douglas <ormaaj@gmail.com> 8 Bug-Reference-ID: <7781746.RhfoTROLxF@smorgbox> 9 Bug-Reference-URL: http://lists.gnu.org/archive/html/bug-bash/2014-05/msg00026.html 10 11 Bug-Description: 12 13 The code that creates local variables should not clear the `invisible' 14 attribute when returning an existing local variable. Let the code that 15 actually assigns a value clear it. 16 17 Patch (apply with `patch -p0'): 18 --- a/variables.c 19 +++ b/variables.c 20 @@ -2197,10 +2197,7 @@ make_local_variable (name) 21 /* local foo; local foo; is a no-op. */ 22 old_var = find_variable (name); 23 if (old_var && local_p (old_var) && old_var->context == variable_context) 24 - { 25 - VUNSETATTR (old_var, att_invisible); /* XXX */ 26 - return (old_var); 27 - } 28 + return (old_var); 29 30 was_tmpvar = old_var && tempvar_p (old_var); 31 /* If we're making a local variable in a shell function, the temporary env 32 --- a/patchlevel.h 33 +++ b/patchlevel.h 34 @@ -25,6 +25,6 @@ 35 regexp `^#define[ ]*PATCHLEVEL', since that's what support/mkversion.sh 36 looks for to find the patch level (for the sccs version string). */ 37 38 -#define PATCHLEVEL 16 39 +#define PATCHLEVEL 17 40 41 #endif /* _PATCHLEVEL_H_ */