Re: [PATCH] Don't segfault when uniquifying hidden tied arrays

Bart Schaefer <[email protected]> Sun, 19 Jul 2026 20:17:40 -0700
Newsgroups gmane.comp.shells.zsh.devel
Message-ID <CAH+w=7aoKm=qAt0tMnM+Ls0eF0PvbK_OKqDSM22v38AzgFMxhA@mail.gmail.com>
On Sun, Jul 19, 2026 at 7:28=E2=80=AFPM Philippe Altherr
<[email protected]> wrote:
>
> - (Param) paramtab->getnode(paramtab, pm->ename))) {
> - x =3D (*apm->gsu.a->getfn)(apm);
> +    } else if (PM_TYPE(pm->node.flags) =3D=3D PM_SCALAR && pm->ename) {
> + x =3D *(pm->node.flags & PM_SPECIAL
> +      ? (char ***)pm->u.data
> +      : ((struct tieddata *)pm->u.data)->arrptr);

Just checking ... apm->gsu.a->getfn can return the static &nullarray
to guarantee the result is never NULL.

Are you confident that pm->u.data is never NULL or a pointer to NULL here?