mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
When the funstaks() function deletes a stack, other code could
still reference that stack's pointer, at least if a script's DEBUG
trap changed the function context by assigning to ${.sh.level}.
This crashed @ormaaj's funcname.ksh script in certain contexts, at
least when run as a dot script or in a virtual subshell.
This allows that script to run in all contexts by making
funstaks(s) set the stack pointer to NULL after deleting the stack
and making various other points in the code check for a null
pointer before dereferencing it.
This may not be the most elegant fix but (in my testing) it does
work, even when compiling ksh with AddressSanitiser.
Thanks to @JohnoKing for help researching this problem.
Resolves: https://github.com/ksh93/ksh/issues/212
|
||
|---|---|---|
| .. | ||
| builtin | ||
| INIT | ||
| ksh93 | ||
| Mamfile | ||