From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24881 invoked by alias); 11 Mar 2011 06:55:07 -0000 Received: (qmail 24871 invoked by uid 22791); 11 Mar 2011 06:55:06 -0000 X-SWARE-Spam-Status: No, hits=-51.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00 X-Spam-Check-By: sourceware.org Received: from localhost (HELO sourceware.org) (127.0.0.1) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 11 Mar 2011 06:55:03 +0000 From: "jakub at redhat dot com" To: glibc-bugs-regex@sources.redhat.com Subject: [Bug regex/12567] regexec leaks mem when used multiple times X-Bugzilla-Reason: CC X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: glibc X-Bugzilla-Component: regex X-Bugzilla-Keywords: X-Bugzilla-Severity: normal X-Bugzilla-Who: jakub at redhat dot com X-Bugzilla-Status: RESOLVED X-Bugzilla-Priority: P2 X-Bugzilla-Assigned-To: drepper.fsp at gmail dot com X-Bugzilla-Target-Milestone: --- X-Bugzilla-Changed-Fields: Status CC Resolution Message-ID: In-Reply-To: References: X-Bugzilla-URL: http://sourceware.org/bugzilla/ Auto-Submitted: auto-generated Content-Type: text/plain; charset="UTF-8" MIME-Version: 1.0 Date: Fri, 11 Mar 2011 06:55:00 -0000 Mailing-List: contact glibc-bugs-regex-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-regex-owner@sourceware.org X-SW-Source: 2011-03/txt/msg00002.txt.bz2 http://sourceware.org/bugzilla/show_bug.cgi?id=12567 Jakub Jelinek changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |jakub at redhat dot com Resolution| |INVALID --- Comment #1 from Jakub Jelinek 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.