From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16508 invoked from network); 2 Jun 2000 06:06:51 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 2 Jun 2000 06:06:51 -0000 Received: (qmail 23488 invoked by alias); 2 Jun 2000 06:06:43 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 11719 Received: (qmail 23478 invoked from network); 2 Jun 2000 06:06:42 -0000 Message-ID: <20000602060640.28323.qmail@web1303.mail.yahoo.com> Date: Thu, 1 Jun 2000 23:06:40 -0700 (PDT) From: Felix Rosencrantz Subject: Memory leaks. To: zsh-workers MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Since, we are sort of in a holding pattern to get a stable release, I started doing some automated memory leak testing. I've already posted a couple patches, here are some possible remaining leaks that need to be fixed. Most of these were found by running the tests. Some are from just my usage of zsh. The possible sources of the memory leaks are: bin_compadd() addvars() mkautofn() permmatches() -FR Memory leak from bin_compadd(): malloc [rtlib.o] zcalloc [mem.c:469] parse_cmatcher [complete.c:294] bin_compadd [complete.c:580] execbuiltin [builtin.c:368] execcmd [exec.c:2257] Another leak in bin_compadd: malloc [rtlib.o] zalloc [mem.c:453] ztrdup [mem.c:530] bin_compadd [complete.c:574] execbuiltin [builtin.c:368] execcmd [exec.c:2257] I think this is due to the fact that we do a tricat on complete.c:572, without freeing the previous values of mstr. Memory leak from addvars(): malloc [rtlib.o] zalloc [mem.c:453] ztrdup [mem.c:530] addvars [exec.c:1510] execsimple [exec.c:750] execlist [exec.c:801] Memory leak out of mkautofn(): malloc [rtlib.o] zalloc [mem.c:453] mkautofn [builtin.c:2161] bin_functions [builtin.c:2143] execbuiltin [builtin.c:368] execcmd [exec.c:2257] Alternate stack traces with the same malloc/zalloc/mkautofn stack: mkautofn bin_functions [builtin.c:2143] bin_typeset [builtin.c:1810] execbuiltin [builtin.c:368] mkautofn eval_autoload [builtin.c:2021] bin_functions [builtin.c:2078] execbuiltin [builtin.c:368] mkautofn bin_functions [builtin.c:2143] execbuiltin [builtin.c:368] execcmd [exec.c:2257] Memory leak from memory allocated in permmatches(): malloc [rtlib.o] zcalloc [mem.c:469] permmatches [compcore.c:2771] get_nmatches [complete.c:1057] getstrvalue [params.c:1367] getarg [params.c:967] Another trace: permmatches [compcore.c:2771] list_lines [compresult.c:1154] get_listlines [complete.c:1064] getstrvalue [params.c:1367] Memory leak from set_gmatcher(): malloc [rtlib.o] zcalloc [mem.c:469] parse_cmatcher [complete.c:294] set_gmatcher [compctl.c:313] get_gmatcher [compctl.c:341] bin_compctl [compctl.c:1587] (I guess this is still in my startup files...) __________________________________________________ Do You Yahoo!? Yahoo! Photos -- now, 100 FREE prints! http://photos.yahoo.com