From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3783 invoked from network); 24 Apr 2002 07:56:56 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 24 Apr 2002 07:56:56 -0000 Received: (qmail 25633 invoked by alias); 24 Apr 2002 07:56:49 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17029 Received: (qmail 25622 invoked from network); 24 Apr 2002 07:56:48 -0000 From: Sven Wischnowsky MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15558.25877.644500.459450@wischnow.berkom.de> Date: Wed, 24 Apr 2002 09:56:05 +0200 To: zsh-workers@sunsite.dk Subject: Re: valgrind: useful memory checker In-Reply-To: <20020422182026.19547.qmail@web10401.mail.yahoo.com> References: <20020422182026.19547.qmail@web10401.mail.yahoo.com> X-Mailer: VM 6.95 under 21.5 (patch 3) "asparagus" XEmacs Lucid Felix Rosencrantz wrote: > ... > > Also, I ran valgrind on zsh interactively for a little bit, did > some completions and found a couple leaks. Of course, adding valgrind > to the automated tests would be quite useful. > > -FR. > ==3725== 80 bytes in 1 blocks are definitely lost in loss record 45 of 136 > ==3725== at 0x808C516: zalloc (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x80A3010: patcompile (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x413C4011: bin_zstyle (in > /bin/linux/zsh-020416d/lib/zsh/4.1.0-dev-4-020416/zsh/zutil.so) > ==3725== by 0x8052425: execbuiltin (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x8067E93: execcmd (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x806484B: execpline2 (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x8063DDF: execpline (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x80637D3: execlist (in /bin/linux/zsh-020416d/bin/zsh) Do you set the same style for the same pattern twice? > ==3725== 132 bytes in 33 blocks are definitely lost in loss record 62 of 136 > ==3725== at 0x808C516: zalloc (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x80B9DE2: zarrdup (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x411EC6D4: comp_wrapper (in > /bin/linux/zsh-020416d/lib/zsh/4.1.0-dev-4-020416/zsh/complete.so) > ==3725== by 0x806AB53: runshfunc (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x806A973: doshfunc (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x806A33C: execshfunc (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x8067E09: execcmd (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== by 0x806484B: execpline2 (in /bin/linux/zsh-020416d/bin/zsh) > ==3725== These are 33 times a char ** to a NULL pointer. The copied compredirs array. Bye Sven Index: Src/Modules/zutil.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Modules/zutil.c,v retrieving revision 1.9 diff -u -r1.9 zutil.c --- Src/Modules/zutil.c 9 Jul 2001 16:05:14 -0000 1.9 +++ Src/Modules/zutil.c 24 Apr 2002 07:56:12 -0000 @@ -132,6 +132,7 @@ freearray(p->vals); if (p->eval) freeeprog(p->eval); + freepatprog(p->prog); p->vals = zarrdup(vals); p->eval = eprog; Index: Src/Zle/complete.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/Zle/complete.c,v retrieving revision 1.20 diff -u -r1.20 complete.c --- Src/Zle/complete.c 1 Mar 2002 10:42:02 -0000 1.20 +++ Src/Zle/complete.c 24 Apr 2002 07:56:12 -0000 @@ -1320,6 +1320,7 @@ zsfree(oqs); zsfree(oaq); freearray(owords); + freearray(oredirs); } zsfree(comprestore); comprestore = orest; -- Sven Wischnowsky wischnow@berkom.de