From: Peter Stephenson <pws@csr.com>
To: zsh-workers@sunsite.dk (Zsh hackers list)
Subject: Re: More memory problems found by valgrind
Date: Thu, 08 Aug 2002 11:15:57 +0100 [thread overview]
Message-ID: <22681.1028801757@csr.com> (raw)
In-Reply-To: "Felix Rosencrantz"'s message of "Wed, 07 Aug 2002 22:27:22 PDT." <20020808052722.15964.qmail@web10403.mail.yahoo.com>
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 <pws@csr.com> 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.
**********************************************************************
next prev parent reply other threads:[~2002-08-08 10:16 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-08-08 5:27 Felix Rosencrantz
2002-08-08 10:15 ` Peter Stephenson [this message]
2002-08-08 10:27 ` Peter Stephenson
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=22681.1028801757@csr.com \
--to=pws@csr.com \
--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).