This is the mail archive of the
glibc-bugs@sourceware.org
mailing list for the glibc project.
[Bug regex/12567] regexec leaks mem when used multiple times
- From: "jakub at redhat dot com" <sourceware-bugzilla at sourceware dot org>
- To: glibc-bugs at sources dot redhat dot com
- Date: Fri, 11 Mar 2011 06:55:06 +0000
- Subject: [Bug regex/12567] regexec leaks mem when used multiple times
- Auto-submitted: auto-generated
- References: <bug-12567-131@http.sourceware.org/bugzilla/>
http://sourceware.org/bugzilla/show_bug.cgi?id=12567
Jakub Jelinek <jakub at redhat dot com> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |jakub at redhat dot com
Resolution| |INVALID
--- Comment #1 from Jakub Jelinek <jakub at redhat dot com> 2011-03-11 06:54:54 UTC ---
You clearly don't understand what is a memory leak. Just call regfree at the
end of the testcase and you'll see that no memory has been leaked.
glibc regex implementation is a DFA, which creates needed nodes on the fly. If
you always search the same string, after a first regexec new nodes won't need
to be created, but if you always search different strings, it may be that they
need to. All the memory allocated memory is tracked and freed upon regfree
though.
--
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.