Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
PATCH: Re: Bug#251378: zsh: segfaults when globing includes too many files
- X-seq: zsh-workers 20173
- From: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: PATCH: Re: Bug#251378: zsh: segfaults when globing includes too many files
- Date: Sat, 17 Jul 2004 20:20:20 +0100
- Cc: 251378@xxxxxxxxxxxxxxx, 259768-forwarded@xxxxxxxxxxxxxxx, 259768-submitter@xxxxxxxxxxxxxxx, mdz@xxxxxxxxxx
- In-reply-to: "Clint Adams"'s message of "Fri, 16 Jul 2004 13:56:20 EDT." <20040716175620.GA22143@xxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
This seems to fix it. It was actually fairly obvious, since there was
only one case of reallocationg a heap where fheap wasn't set to NULL.
However, the script focussed my mind wonderfully.
Index: Src/mem.c
===================================================================
RCS file: /cvsroot/zsh/zsh/Src/mem.c,v
retrieving revision 1.11
diff -u -r1.11 mem.c
--- Src/mem.c 2 Jun 2004 22:14:26 -0000 1.11
+++ Src/mem.c 17 Jul 2004 19:18:10 -0000
@@ -491,6 +491,7 @@
*/
size_t n = (new + sizeof(*h) + HEAPSIZE);
n -= n % HEAPSIZE;
+ fheap = NULL;
#ifdef USE_MMAP
{
--
Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxxxxx>
Work: pws@xxxxxxx
Web: http://www.pwstephenson.fsnet.co.uk
Messages sorted by:
Reverse Date,
Date,
Thread,
Author