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

Re: [bug report] 4.0.2 / 4.0.4 dumps core



I wrote:

> > schaefer[524] Src/zsh -f
> > zagzig% setopt extendedglob globcomplete nobanghist
> > zagzig% !^<TAB>zsh: segmentation fault (core dumped)  Src/zsh -f
> 
> I had a patch for this, too, that just made the shell use 
> duplicates in the
> reswdtab - it isn't that much memory being wasted (but of 
> course I forgot
> to bring that patch together with the other one).

Here's that patch.

Bye
  Sven

diff -ur ../oz/Src/hashtable.c ./Src/hashtable.c
--- ../oz/Src/hashtable.c	Tue Nov 13 19:13:45 2001
+++ ./Src/hashtable.c	Tue Nov 13 19:26:12 2001
@@ -975,7 +975,7 @@
     reswdtab->printnode   = printreswdnode;
 
     for (rw = reswds; rw->nam; rw++)
-	reswdtab->addnode(reswdtab, rw->nam, rw);
+	reswdtab->addnode(reswdtab, ztrdup(rw->nam), rw);
 }
 
 /* Print a reserved word */



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