Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] Fix crash on unset-through-nameref



2024-03-04 00:39:30 -0800, Bart Schaefer:
> On Sun, Mar 3, 2024 at 10:29 PM Stephane Chazelas <stephane@xxxxxxxxxxxx> wrote:
> >
> > That shows an unset through a nameref in a different scope
> > doesn't do a full unset
> 
> Try removing this line from the patch:
> 
> +    pm->node.flags |= PM_DECLARED;
> 
> If that works, it'll also require updating the test.

That helps a bit but:

$ ./Src/zsh -c 'myunset() { typeset -n v=$1; unset v; }; export x=1; myunset x; typeset -p x; x=2; typeset -p x'
export x=2

It still retained its export attribute.

-- 
Stephane





Messages sorted by: Reverse Date, Date, Thread, Author