From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 16:56:52 2017 Received: (at submit) by debbugs.gnu.org; 18 Jan 2017 21:56:52 +0000 Received: from localhost ([127.0.0.1]:35043 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTyDr-0007FQ-Ql for submit@debbugs.gnu.org; Wed, 18 Jan 2017 16:56:52 -0500 Received: from eggs.gnu.org ([208.118.235.92]:53014) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTyDq-0007FE-5F for submit@debbugs.gnu.org; Wed, 18 Jan 2017 16:56:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTyDk-0005kx-BN for submit@debbugs.gnu.org; Wed, 18 Jan 2017 16:56:45 -0500 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on eggs.gnu.org X-Spam-Level: *** X-Spam-Status: No, score=3.3 required=5.0 tests=BAYES_50, RECEIVED_FROM_WINDOWS_HOST, T_MANY_HDRS_LCASE autolearn=disabled version=3.3.2 Received: from lists.gnu.org ([2001:4830:134:3::11]:41241) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cTyDk-0005kt-98 for submit@debbugs.gnu.org; Wed, 18 Jan 2017 16:56:44 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43968) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTyDj-00031q-9W for bug-grep@gnu.org; Wed, 18 Jan 2017 16:56:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cTyDf-0005fm-9M for bug-grep@gnu.org; Wed, 18 Jan 2017 16:56:43 -0500 Received: from mxout5.netvision.net.il ([194.90.6.65]:49677) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cTyDf-0005dW-2o for bug-grep@gnu.org; Wed, 18 Jan 2017 16:56:39 -0500 MIME-version: 1.0 Content-transfer-encoding: 7BIT Content-type: text/plain; CHARSET=US-ASCII Received: from skeeve.com ([46.116.115.110]) by mxout5.netvision.net.il (Oracle Communications Messaging Server 7u4-24.01(7.0.4.24.0) 64bit (built Nov 17 2011)) with ESMTPSA id <0OJZ00IIMUV74000@mxout5.netvision.net.il> for bug-grep@gnu.org; Wed, 18 Jan 2017 23:11:32 +0200 (IST) Received: from skeeve.com (skeeve.com [127.0.0.1]) by skeeve.com (8.15.2/8.15.2/Debian-3) with ESMTP id v0ILBUpq030639 for ; Wed, 18 Jan 2017 23:11:30 +0200 Received: (from arnold@localhost) by skeeve.com (8.15.2/8.15.2/Submit) id v0ILBSkA030638 for bug-grep@gnu.org; Wed, 18 Jan 2017 23:11:28 +0200 From: Arnold Robbins Message-id: <201701182111.v0ILBSkA030638@skeeve.com> Date: Wed, 18 Jan 2017 23:11:28 +0200 To: bug-grep@gnu.org Subject: memory leaks in dfa User-Agent: Heirloom mailx 12.5 6/20/10 X-detected-operating-system: by eggs.gnu.org: Windows NT kernel [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 2001:4830:134:3::11 X-Spam-Score: -5.0 (-----) X-Debbugs-Envelope-To: submit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.0 (-----) Hi Grep Guys. Please: clone gawk repo cd gawk ./bootstrap.sh && ./configure && make -j make valgrind Look at the 'definitely lost' lines. For example: ==30472== 240 bytes in 2 blocks are definitely lost in loss record 128 of 170 ==30472== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64 -linux.so) ==30472== by 0x44D42A: emalloc_real (awk.h:1923) ==30472== by 0x44D42A: xmalloc (gawkmisc.c:57) ==30472== by 0x468806: xnmalloc (xalloc.h:134) ==30472== by 0x468806: alloc_position_set (dfa.c:2057) ==30472== by 0x468D93: epsclosure (dfa.c:2272) ==30472== by 0x468D93: dfaanalyze (dfa.c:2601) ==30472== by 0x46CA84: dfacomp (dfa.c:3531) ==30472== by 0x463284: make_regexp (re.c:231) ==30472== by 0x414548: make_regnode (awkgram.y:5005) ==30472== by 0x416A33: yyparse (awkgram.y:505) ==30472== by 0x41C9E3: parse_program (awkgram.y:2580) ==30472== by 0x40D373: main (main.c:459) There may be other paths as well. Can y'all track this down and fix? Thanks, Arnold From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 17:56:48 2017 Received: (at 25479) by debbugs.gnu.org; 18 Jan 2017 22:56:48 +0000 Received: from localhost ([127.0.0.1]:35059 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTz9s-0000GR-2B for submit@debbugs.gnu.org; Wed, 18 Jan 2017 17:56:48 -0500 Received: from mailgw04.kcn.ne.jp ([61.86.7.211]:40143) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cTz9q-0000GB-Fd for 25479@debbugs.gnu.org; Wed, 18 Jan 2017 17:56:47 -0500 Received: from mxs02-s (mailgw2.kcn.ne.jp [61.86.15.234]) by mailgw04.kcn.ne.jp (Postfix) with ESMTP id B3B0880676 for <25479@debbugs.gnu.org>; Thu, 19 Jan 2017 07:56:39 +0900 (JST) X-matriXscan-loop-detect: e44adc7dfad0c6f5ee753355df75bb57815e49f8 Received: from mail05.kcn.ne.jp ([61.86.6.184]) by mxs02-s with ESMTP; Thu, 19 Jan 2017 07:56:38 +0900 (JST) Received: from [10.120.1.48] (i118-21-128-66.s30.a048.ap.plala.or.jp [118.21.128.66]) by mail05.kcn.ne.jp (Postfix) with ESMTPA id 3D2927D009C; Thu, 19 Jan 2017 07:56:38 +0900 (JST) Date: Thu, 19 Jan 2017 07:56:40 +0900 From: Norihiro Tanaka To: Arnold Robbins Subject: Re: bug#25479: memory leaks in dfa In-Reply-To: <201701182111.v0ILBSkA030638@skeeve.com> References: <201701182111.v0ILBSkA030638@skeeve.com> Message-Id: <20170119075640.B17C.27F6AC2D@kcn.ne.jp> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------_587FF18000000000B173_MULTIPART_MIXED_" Content-Transfer-Encoding: 7bit X-Mailer: Becky! ver. 2.65.07 [ja] X-matriXscan-Sophos-AV: Clean X-matriXscan-Action: Approve X-matriXscan: Uncategorized X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25479 Cc: bug-gnulib@gnu.org, 25479@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) --------_587FF18000000000B173_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit On Wed, 18 Jan 2017 23:11:28 +0200 Arnold Robbins wrote: > Hi Grep Guys. > > Please: > > clone gawk repo > cd gawk > ./bootstrap.sh && ./configure && make -j > make valgrind > > Look at the 'definitely lost' lines. For example: > > ==30472== 240 bytes in 2 blocks are definitely lost in loss record 128 of 170 > ==30472== at 0x4C2DB8F: malloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64 > -linux.so) > ==30472== by 0x44D42A: emalloc_real (awk.h:1923) > ==30472== by 0x44D42A: xmalloc (gawkmisc.c:57) > ==30472== by 0x468806: xnmalloc (xalloc.h:134) > ==30472== by 0x468806: alloc_position_set (dfa.c:2057) > ==30472== by 0x468D93: epsclosure (dfa.c:2272) > ==30472== by 0x468D93: dfaanalyze (dfa.c:2601) > ==30472== by 0x46CA84: dfacomp (dfa.c:3531) > ==30472== by 0x463284: make_regexp (re.c:231) > ==30472== by 0x414548: make_regnode (awkgram.y:5005) > ==30472== by 0x416A33: yyparse (awkgram.y:505) > ==30472== by 0x41C9E3: parse_program (awkgram.y:2580) > ==30472== by 0x40D373: main (main.c:459) > > There may be other paths as well. > > Can y'all track this down and fix? > > Thanks, > > Arnold Thanks for the report. It is caused by temporarily allocated memory not freed. --------_587FF18000000000B173_MULTIPART_MIXED_ Content-Type: text/plain; charset="US-ASCII"; name="0001-dfa-fix-memory-leak-in-parse.patch" Content-Disposition: attachment; filename="0001-dfa-fix-memory-leak-in-parse.patch" Content-Transfer-Encoding: base64 RnJvbSAzNDc5YmNlODU0MmY3NWMxMWU2YjBiOTkwN2UyMmIyNmQ5MTg2NWNhIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBOb3JpaGlybyBUYW5ha2EgPG5vcml0bmtAa2NuLm5lLmpwPgpE YXRlOiBUaHUsIDE5IEphbiAyMDE3IDA3OjQ0OjEzICswOTAwClN1YmplY3Q6IFtQQVRDSF0gZGZh OiBmaXggbWVtb3J5IGxlYWsgaW4gcGFyc2UKClByb2JsZW0gcmVwb3J0ZWQgYnkgQXJub2xkIFJv YmJpbnMgaW46Cmh0dHA6Ly9saXN0cy5nbnUub3JnL2FyY2hpdmUvaHRtbC9idWctZ3JlcC8yMDE3 LTAxL21zZzAwMDA2Lmh0bWwKCiogbGliL2RmYS5jIChlcHNjbG9zdXJlKTogRG8gaXQuCi0tLQog bGliL2RmYS5jIHwgICAgMSArCiAxIGZpbGVzIGNoYW5nZWQsIDEgaW5zZXJ0aW9ucygrKSwgMCBk ZWxldGlvbnMoLSkKCmRpZmYgLS1naXQgYS9saWIvZGZhLmMgYi9saWIvZGZhLmMKaW5kZXggZjZj MzAxNy4uNWJhYzI4OCAxMDA2NDQKLS0tIGEvbGliL2RmYS5jCisrKyBiL2xpYi9kZmEuYwpAQCAt MjI2Miw2ICsyMjYyLDcgQEAgZXBzY2xvc3VyZSAocG9zaXRpb25fc2V0ICppbml0aWFsLCBzdHJ1 Y3QgZGZhIGNvbnN0ICpkKQogCiAgICAgICAgIHJlcGxhY2UgKGluaXRpYWwsIGksICZkLT5mb2xs b3dzW2ldLCBjb25zdHJhaW50LCAmdG1wKTsKICAgICAgIH0KKyAgZnJlZSAodG1wLmVsZW1zKTsK IH0KIAogLyogUmV0dXJucyB0aGUgc2V0IG9mIGNvbnRleHRzIGZvciB3aGljaCB0aGVyZSBpcyBh dCBsZWFzdCBvbmUKLS0gCjEuNy4xCgo= --------_587FF18000000000B173_MULTIPART_MIXED_-- From debbugs-submit-bounces@debbugs.gnu.org Wed Jan 18 19:46:06 2017 Received: (at 25479-done) by debbugs.gnu.org; 19 Jan 2017 00:46:06 +0000 Received: from localhost ([127.0.0.1]:35081 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cU0re-0002tz-7t for submit@debbugs.gnu.org; Wed, 18 Jan 2017 19:46:06 -0500 Received: from zimbra.cs.ucla.edu ([131.179.128.68]:33170) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cU0rc-0002tF-4Y for 25479-done@debbugs.gnu.org; Wed, 18 Jan 2017 19:46:04 -0500 Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 3FDC0160076; Wed, 18 Jan 2017 16:45:57 -0800 (PST) Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id gkYo4JX_VOlR; Wed, 18 Jan 2017 16:45:56 -0800 (PST) Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id 925EC16007A; Wed, 18 Jan 2017 16:45:56 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id 13dXkit7wox6; Wed, 18 Jan 2017 16:45:56 -0800 (PST) Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id 7555D160076; Wed, 18 Jan 2017 16:45:56 -0800 (PST) Subject: Re: bug#25479: memory leaks in dfa To: Norihiro Tanaka , Arnold Robbins References: <201701182111.v0ILBSkA030638@skeeve.com> <20170119075640.B17C.27F6AC2D@kcn.ne.jp> From: Paul Eggert Organization: UCLA Computer Science Department Message-ID: <75b050e1-1154-c22a-550e-0b07307b8b30@cs.ucla.edu> Date: Wed, 18 Jan 2017 16:45:56 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0 MIME-Version: 1.0 In-Reply-To: <20170119075640.B17C.27F6AC2D@kcn.ne.jp> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Spam-Score: -3.2 (---) X-Debbugs-Envelope-To: 25479-done Cc: bug-gnulib@gnu.org, 25479-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.2 (---) Thanks for the fix; I installed it into gnulib and am closing this bug report. From unknown Sat Sep 06 02:03:26 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Thu, 16 Feb 2017 12:24:04 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator