zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@pwstephenson.fsnet.co.uk>
To: zsh-workers@sunsite.dk
Cc: 251378@bugs.debian.org, 259768-forwarded@bugs.debian.org,
	259768-submitter@bugs.debian.org, mdz@debian.org
Subject: PATCH: Re: Bug#251378: zsh: segfaults when globing includes too many files
Date: Sat, 17 Jul 2004 20:20:20 +0100	[thread overview]
Message-ID: <20040717192021.B7643865D@pwstephenson.fsnet.co.uk> (raw)
In-Reply-To: "Clint Adams"'s message of "Fri, 16 Jul 2004 13:56:20 EDT." <20040716175620.GA22143@scowler.net>

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@pwstephenson.fsnet.co.uk>
Work: pws@csr.com
Web: http://www.pwstephenson.fsnet.co.uk


  parent reply	other threads:[~2004-07-17 19:21 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20040528125647.GA21000@scowler.net>
     [not found] ` <20040528131425.GC2289@via.ecp.fr>
     [not found]   ` <20040528135026.GA21637@scowler.net>
     [not found]     ` <20040528135729.GD2289@via.ecp.fr>
     [not found]       ` <20040528141431.GA30024@scowler.net>
     [not found]         ` <20040528142505.GE2289@via.ecp.fr>
     [not found]           ` <20040528174021.GA5975@scowler.net>
     [not found]             ` <20040528190653.GA2661@via.ecp.fr>
     [not found]               ` <20040706181235.GA32727@scowler.net>
     [not found]                 ` <20040706184752.GC1881@alcor.net>
2004-07-06 18:59                   ` Clint Adams
2004-07-06 19:22                     ` Clint Adams
2004-07-13 11:06                       ` Peter Stephenson
2004-07-16 17:56                         ` Clint Adams
2004-07-16 19:46                           ` Clint Adams
2004-07-17 19:06                             ` Peter Stephenson
2004-07-17 19:20                           ` Peter Stephenson [this message]
2004-07-07 11:01                     ` Peter Stephenson
2004-07-07 12:36                       ` Clint Adams

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20040717192021.B7643865D@pwstephenson.fsnet.co.uk \
    --to=pws@pwstephenson.fsnet.co.uk \
    --cc=251378@bugs.debian.org \
    --cc=259768-forwarded@bugs.debian.org \
    --cc=259768-submitter@bugs.debian.org \
    --cc=mdz@debian.org \
    --cc=zsh-workers@sunsite.dk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).