Return-Path: Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: (qmail 96581 invoked from network); 12 Nov 2007 08:05:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 12 Nov 2007 08:05:18 -0000 Received: (qmail 10607 invoked by uid 500); 12 Nov 2007 08:05:04 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 10104 invoked by uid 500); 12 Nov 2007 08:05:02 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 10093 invoked by uid 99); 12 Nov 2007 08:05:02 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 00:05:02 -0800 X-ASF-Spam-Status: No, hits=-4.0 required=10.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [195.227.30.246] (HELO datura.kippdata.de) (195.227.30.246) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 12 Nov 2007 08:05:06 +0000 Received: from [192.168.2.104] ([192.168.2.104]) by datura.kippdata.de (8.13.5/8.13.5) with ESMTP id lAC84huD008962 for ; Mon, 12 Nov 2007 09:04:43 +0100 (CET) Message-ID: <47380903.4050109@kippdata.de> Date: Mon, 12 Nov 2007 09:04:19 +0100 From: Rainer Jung User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: svn commit: r593943 - /tomcat/connectors/trunk/jk/native/apache-2.0/mod_jk.c References: <20071111192225.11DEF1A9832@eris.apache.org> <4737F85B.3000407@apache.org> In-Reply-To: <4737F85B.3000407@apache.org> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org Mladen Turk schrieb: > rjung@apache.org wrote: >> Author: rjung >> Date: Sun Nov 11 11:22:23 2007 >> New Revision: 593943 >> >> URL: http://svn.apache.org/viewvc?rev=593943&view=rev >> Log: >> Undo revision 593927. >> This produced a mem leak for vhosts with private JkMounts. >> No idea why. >> > > Because uw_map is now allocated *only* if uri_to_context is > allocated. In other cases uw_map is pointer to the parent > allocated uw_map. So if you free uw_map with uri_to_context equals > NULL, you'll actually have a double free of the same pointer. The point was not a double free (crash), but a memory leak. I freed uri_to_context in post_config and uw_map in the cleanup. Before freeing I actually tested both against NULL. To find out, where th eleak comes from, I also simply didn't initialize uw_map and still had the leak! When I didn't initialize uri_to_context in the JkMount config handler, the leak went away. With only uri_to_context used and uw_map artificially commented out, I could open/close the leak by moving the free of uri_to_context from the cleanup (OK) to post_config (bad). That's what I don't understand. Regards, Rainer P.S.: I hope the other changes are fine with you? --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org