On 6/22/23 12:36 PM, Grisha Levit wrote:
`read' can hit its timeout before it gets a chance to save the current
signal mask so sigprocmask can end up restoring an uninitialized
prevset. (Also all the sigprocmask calls other than the one in the jmp
target are protected by `#if defined (SIGCHLD)' s
Using `export' / `readonly' on a variable that's present in both the temp
env and a calling function's local context combines the attributes of all
the intervening scopes in the global variable:
$ declare -A v; f() { local -a v; v= e; }; e() { export v; }
$ (f; declare -p v)
declare -aAx v=([0]=""
`read' can hit its timeout before it gets a chance to save the current
signal mask so sigprocmask can end up restoring an uninitialized
prevset. (Also all the sigprocmask calls other than the one in the jmp
target are protected by `#if defined (SIGCHLD)' so I guess this one
should be too)
Found by
On 6/17/23 2:57 AM, Grisha Levit wrote:
Only triggered by doing something stupid:
bash -c 'declare -n OLDPWD=X[SHLVL=-1]; /; cd /'
bash: line 1: X[SHLVL=-1]: bad array subscript
Segmentation fault: 11
Thanks for the report.
--
``The lyf so short, the craft so long to lerne.'' - Chaucer
On 6/17/23 2:49 AM, Grisha Levit wrote:
My earlier patch for adding compgen -V did the variable assignment in a
pretty silly way and had a small memory leak to boot. Hope this new way
makes sense, sorry for the extra work.
Thanks for the update.
Chet
--
``The lyf so short, the craft so long t
On 6/17/23 2:55 AM, Grisha Levit wrote:
Some uninitialized variable access identified by clang's static analyzer.
(FWIW 90% of the reports were bogus but these seem legit)
Thanks for the report and wading through the false positives.
Chet
--
``The lyf so short, the craft so long to lerne.'' -