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

Re: zmodload (-u?) changing options (was Re: [PATCH] Named reference typos & misc.)



> On 21/02/2023 11:47 Peter Stephenson <p.w.stephenson@xxxxxxxxxxxx> wrote:
> The point where the invalid memory is being accessed is therefore
> apparently using an autoload stub when the full parameter has
> already been loaded.  So is the code in question hanging onto
> a parameter pointer that it should instead be looking up again
> after some complicated intervening operation that happens to do
> the autoload?

Yes, here.  "zmodload -u zsh/parameter" followed by completion
gave me enough information.  This removes the errors from that
case, so hopefully will get rid of the test problems too.

This can't be wrong, I'll commit it.

pws

diff --git a/Src/params.c b/Src/params.c
index e940d7995..90302b1b0 100644
--- a/Src/params.c
+++ b/Src/params.c
@@ -538,7 +538,7 @@ getparamnode(HashTable ht, const char *nam)
     }
 
     if (hn && ht == realparamtab)
-	hn = resolve_nameref(pm, NULL);
+	hn = resolve_nameref((Param)hn, NULL);
     return hn;
 }




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