From dev-return-24622-apmail-apr-dev-archive=apr.apache.org@apr.apache.org Wed Jan 25 15:22:12 2012 Return-Path: X-Original-To: apmail-apr-dev-archive@www.apache.org Delivered-To: apmail-apr-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 87A31950D for ; Wed, 25 Jan 2012 15:22:12 +0000 (UTC) Received: (qmail 21642 invoked by uid 500); 25 Jan 2012 15:22:12 -0000 Delivered-To: apmail-apr-dev-archive@apr.apache.org Received: (qmail 21425 invoked by uid 500); 25 Jan 2012 15:22:10 -0000 Mailing-List: contact dev-help@apr.apache.org; run by ezmlm Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Id: Delivered-To: mailing list dev@apr.apache.org Received: (qmail 21417 invoked by uid 99); 25 Jan 2012 15:22:10 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 25 Jan 2012 15:22:10 +0000 Received: by minotaur.apache.org (Postfix, from userid 2161) id 3B00C934A; Wed, 25 Jan 2012 15:22:10 +0000 (UTC) Received: from [IPv6:::1] (localhost [IPv6:::1]) by gauss.localdomain (Postfix) with ESMTP id 659AA4AD for ; Wed, 25 Jan 2012 16:22:07 +0100 (CET) Message-ID: <4F201E1F.5000509@apache.org> Date: Wed, 25 Jan 2012 16:22:07 +0100 From: Ruediger Pluem User-Agent: Mozilla/5.0 (X11; Linux i686 on x86_64; rv:9.0.1) Gecko/20111221 Firefox/9.0.1 SeaMonkey/2.6.1 MIME-Version: 1.0 To: APR Developer List Subject: Re: svn commit: r1231605 - /apr/apr/trunk/tables/apr_hash.c References: <20120115003715.071D423888FD@eris.apache.org> <032101ccd3a8$13a700a0$3af501e0$@qqmail.nl> <1326702298.14764.7.camel@shrek.rexursive.com> <4F14221D.4090108@apache.org> <1327299917.3515.1.camel@shrek.rexursive.com> In-Reply-To: <1327299917.3515.1.camel@shrek.rexursive.com> X-Enigmail-Version: 1.3.4 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bojan Smojver wrote: > On Mon, 2012-01-16 at 14:11 +0100, Ruediger Pluem wrote: >> r1231605 and r1231858 cause massive regressions and test case failures >> in httpd. Not sure why right now. > > Could you please run your tests with this patch. Let me know how it > goes. Thanks. > I think there is still a problem with your patch: @@ -468,6 +484,12 @@ for (k = 0; k <= overlay->max; k++) { for (iter = overlay->array[k]; iter; iter = iter->next) { + if (res->hash_func) + iter->hash = res->hash_func(iter->key, &iter->klen); + else + iter->hash = apr_hashfunc_default_internal(iter->key, + &iter->klen, + res->seed); Shouldn't you store the result of res->hash_func / apr_hashfunc_default_internal in a local temporary variable and use it later on? Otherwise you change the overlay hash and may make it unusable by setting a new hash value. IMHO all operations by this code are currently readonly on the base and overlay hash. i = iter->hash & res->max; for (ent = res->array[i]; ent; ent = ent->next) { if ((ent->klen == iter->klen) && Regards RĂ¼diger