This is the mail archive of the glibc-bugs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug regex/12567] regexec leaks mem when used multiple times


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.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]