From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1530 invoked from network); 8 Aug 2002 10:16:33 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 8 Aug 2002 10:16:33 -0000 Received: (qmail 29214 invoked by alias); 8 Aug 2002 10:16:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17516 Received: (qmail 29199 invoked from network); 8 Aug 2002 10:16:26 -0000 To: zsh-workers@sunsite.dk (Zsh hackers list) Subject: Re: More memory problems found by valgrind In-reply-to: "Felix Rosencrantz"'s message of "Wed, 07 Aug 2002 22:27:22 PDT." <20020808052722.15964.qmail@web10403.mail.yahoo.com> Date: Thu, 08 Aug 2002 11:15:57 +0100 Message-ID: <22681.1028801757@csr.com> From: Peter Stephenson Felix Rosencrantz wrote: > I ran zsh (pulled from cvs on July 30th) under valgrind for about a week. > Below is a condensed version of the output from that run. > > -FR. > > > 80 bytes in 1 blocks are definitely lost in loss record 4 of 17 > at 0x400467C4: malloc (vg_clientfuncs.c:100) > by 0x808C606: zalloc (mem.c:490) > by 0x80A3190: patcompile (pattern.c:436) > by 0x4428DFD1: bin_zstyle (zutil.c:292) Let's try and pick these off one by one... Here's my guess for this one. Index: Src/Modules/zutil.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/zutil.c,v retrieving revision 1.11 diff -u -r1.11 zutil.c --- Src/Modules/zutil.c 25 Apr 2002 07:33:36 -0000 1.11 +++ Src/Modules/zutil.c 8 Aug 2002 10:15:01 -0000 @@ -119,7 +119,10 @@ errflag = ef; if (!eprog) + { + freepatprog(prog); return 1; + } eprog = dupeprog(eprog, 0); } @@ -134,6 +137,7 @@ freeeprog(p->eval); p->vals = zarrdup(vals); p->eval = eprog; + freepatprog(prog); return 0; } -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** The information transmitted is intended only for the person or entity to which it is addressed and may contain confidential and/or privileged material. Any review, retransmission, dissemination or other use of, or taking of any action in reliance upon, this information by persons or entities other than the intended recipient is prohibited. If you received this in error, please contact the sender and delete the material from any computer. **********************************************************************