Re: [PATCH] Don't perform dereferencing when looking up certain special parameters

Bart Schaefer <[email protected]> Sun, 21 Jun 2026 17:05:15 -0700
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <CAH+w=7ZOQCBnSpJZa_WiroGb8O38Qce9eibD50q+_XE9CCrbxw@mail.gmail.com>
I should perhaps have looked more closely at this before committing it.

On Tue, May 5, 2026 at 4:08 PM Philippe Altherr
<[email protected]> wrote:
>
> The code managing a number of special parameters performs dereferencing while looking up the parameter. This often leads to bogus behavior.
> In this case, the wrong parameter is exported. In many cases, the fix is to simply not perform any dereferencing, which is what the following patch does for a number of special parameters.

A side-effect of switching from paramtab->getnode() to
realparamtab->getnode2() is that the call to loadparamnode() is
bypassed.  That came from
workers/53781: fix loading of autoload variable via a reference
I suspect this is OK in the specific circumstances.  Calling it out in case not.