GNU bug report logs - #25479
memory leaks in dfa

Previous Next

Package: grep;

Reported by: Arnold Robbins <arnold <at> skeeve.com>

Date: Wed, 18 Jan 2017 21:57:01 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 25479 in the body.
You can then email your comments to 25479 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-grep <at> gnu.org:
bug#25479; Package grep. (Wed, 18 Jan 2017 21:57:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Arnold Robbins <arnold <at> skeeve.com>:
New bug report received and forwarded. Copy sent to bug-grep <at> gnu.org. (Wed, 18 Jan 2017 21:57:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Arnold Robbins <arnold <at> skeeve.com>
To: bug-grep <at> gnu.org
Subject: memory leaks in dfa
Date: Wed, 18 Jan 2017 23:11:28 +0200
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




Information forwarded to bug-grep <at> gnu.org:
bug#25479; Package grep. (Wed, 18 Jan 2017 22:57:02 GMT) Full text and rfc822 format available.

Message #8 received at 25479 <at> debbugs.gnu.org (full text, mbox):

From: Norihiro Tanaka <noritnk <at> kcn.ne.jp>
To: Arnold Robbins <arnold <at> skeeve.com>
Cc: bug-gnulib <at> gnu.org, 25479 <at> debbugs.gnu.org
Subject: Re: bug#25479: memory leaks in dfa
Date: Thu, 19 Jan 2017 07:56:40 +0900
[Message part 1 (text/plain, inline)]
On Wed, 18 Jan 2017 23:11:28 +0200
Arnold Robbins <arnold <at> skeeve.com> 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.
[0001-dfa-fix-memory-leak-in-parse.patch (text/plain, attachment)]

Reply sent to Paul Eggert <eggert <at> cs.ucla.edu>:
You have taken responsibility. (Thu, 19 Jan 2017 00:47:01 GMT) Full text and rfc822 format available.

Notification sent to Arnold Robbins <arnold <at> skeeve.com>:
bug acknowledged by developer. (Thu, 19 Jan 2017 00:47:02 GMT) Full text and rfc822 format available.

Message #13 received at 25479-done <at> debbugs.gnu.org (full text, mbox):

From: Paul Eggert <eggert <at> cs.ucla.edu>
To: Norihiro Tanaka <noritnk <at> kcn.ne.jp>, Arnold Robbins <arnold <at> skeeve.com>
Cc: bug-gnulib <at> gnu.org, 25479-done <at> debbugs.gnu.org
Subject: Re: bug#25479: memory leaks in dfa
Date: Wed, 18 Jan 2017 16:45:56 -0800
Thanks for the fix; I installed it into gnulib and am closing this bug
report.




bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Thu, 16 Feb 2017 12:24:04 GMT) Full text and rfc822 format available.

This bug report was last modified 8 years and 203 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.