Return-Path: X-Original-To: apmail-subversion-dev-archive@minotaur.apache.org Delivered-To: apmail-subversion-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 9DFBA9E48 for ; Tue, 3 Jan 2012 10:24:27 +0000 (UTC) Received: (qmail 88916 invoked by uid 500); 3 Jan 2012 10:24:27 -0000 Delivered-To: apmail-subversion-dev-archive@subversion.apache.org Received: (qmail 88515 invoked by uid 500); 3 Jan 2012 10:24:05 -0000 Mailing-List: contact dev-help@subversion.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list dev@subversion.apache.org Received: (qmail 88497 invoked by uid 99); 3 Jan 2012 10:24:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 03 Jan 2012 10:24:00 +0000 X-ASF-Spam-Status: No, hits=0.7 required=5.0 tests=RCVD_IN_DNSWL_NONE,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (nike.apache.org: local policy) Received: from [212.82.108.235] (HELO nm4.bt.bullet.mail.ird.yahoo.com) (212.82.108.235) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 03 Jan 2012 10:23:50 +0000 Received: from [212.82.108.229] by nm4.bt.bullet.mail.ird.yahoo.com with NNFMP; 03 Jan 2012 10:23:29 -0000 Received: from [212.82.108.226] by tm2.bt.bullet.mail.ird.yahoo.com with NNFMP; 03 Jan 2012 10:23:29 -0000 Received: from [127.0.0.1] by omp1003.bt.mail.ird.yahoo.com with NNFMP; 03 Jan 2012 10:23:29 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 679443.51465.bm@omp1003.bt.mail.ird.yahoo.com Received: (qmail 22223 invoked by uid 60001); 3 Jan 2012 10:23:29 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=btopenworld.com; s=s1024; t=1325586209; bh=bB6r1dC760bftHBEiFSh+VE5qCHz9Eo9B/avR+/Wjbs=; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=vF2Pm8rM/x4YSVbwGd1JjorWaL+0qaMfYz5wumgfxtbWZ1/O7WkDLhceTUBSO77bCwnAOc2/Z2HVcarTqWYD3tW1Lo1bnxrICU6fIXSvu2LGEwVI+3Udb0yItAp65TnUinUgG0IfipCFn9pE1hcPN77ll1uSi6zPjzQbyqvKyMQ= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=btopenworld.com; h=X-YMail-OSG:Received:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding; b=bE0NMJdEa9Nr+CZFwbhXfElBmrP3nqBmpCKfve51lTg8ngraDNYlW3ecfYse8XO9t0MGJOjehzZ6iF8LJszQS/P8Hexvw6vN0OdSgrUlazjmRWTazsQ8iHzIXS6i9Mt6nuimd/qgirO+GQWeBPMQBBhlcHloG2MzM5NCoz/6rsk=; X-YMail-OSG: bdWYD38VM1nwaoSnALQPoddizy0ADYOtfCBE.S60edvs2EE pEMzuEjhgaMoZizguti2jXO1IcwKofNBVCGAAH2y3Qblw735WE9crnH5.w4a xFjYd7mvSkCkYU4hC6L4fA5PLlzumi92.s1yhpVnCPLlB9kkrugRJ7pYtwjK zCTz58iWfHYW4ZXHZqjXgTnxaV0Sczv.X6_eyGKJDaDf.OdPWg1wcjPgVsOs 9NqCbbwKaFnXqq7Y_.zSYMW6Pys7zCyWjDobJdBHV1TwIgfZehPNo71vC3vb T_jgrFcoeS5Z94aY0r2ddH89KIPzAIhg26l19zIK750QjWEpjsgQUrxGAOdM pVQoQf3HqQXgEWBKWwdJJvazTuMmF.PcsI4M9pGo4.Nx0u_1TJR45jVXXTKS NwoZ7kAKjsq69HMt63eVGyGvRLEepzEJ11DSW.Ok2UqCOzCdGNoiG4OcBKPk sROULq19kxvA- Received: from [82.32.207.221] by web86702.mail.ird.yahoo.com via HTTP; Tue, 03 Jan 2012 10:23:29 GMT X-Mailer: YahooMailWebService/0.8.115.331698 References: <4EFABEBF.2070408@gmail.com> <4EFC8DFA.6060008@gmail.com> Message-ID: <1325586209.19073.YahooMailNeo@web86702.mail.ird.yahoo.com> Date: Tue, 3 Jan 2012 10:23:29 +0000 (GMT) From: Julian Foad Reply-To: Julian Foad Subject: Re: crash fetching status To: =?iso-8859-1?Q?Stefan_K=FCng?= , Hyrum K Wright Cc: Subversion Development In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Virus-Checked: Checked by ClamAV on apache.org Stefan K=FCng wrote:=0A=0A> On Thu, Dec 29, 2011 at 16:57, Stefan K=FCng wr= ote:=0A>> On 29.12.2011 16:43, Hyrum K Wright wrote:=0A>>> On Wed, Dec 28, = 2011 at 1:01 AM, Stefan K=FCng wrote:=0A=0A[...]=0A=0A>>> I looked at simil= ar places elsewhere, and they seemed to follow a=0A>>> pattern. =A0The foll= owing patch is in a similar vein:=0A>>>=0A>>> [[[=0A>>> Index: subversion/l= ibsvn_wc/status.c=0A>>> =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =0A>>> - =A0f->repos_relpath =3D svn_relpath_join(find_dir_repos_relpath(pb= , pool),=0A>>> - =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0f->name, pool);=0A>>> +=0A>>> + =A0dir_repos_relpath =3D= find_dir_repos_relpath(pb, pool);=0A>>> + =A0if (dir_repos_relpath)=0A>>> = + =A0 =A0f->repos_relpath =3D svn_relpath_join(dir_repos_relpath, f->name,= =0A>>> pool);=0A>>> + =A0else=0A>>> + =A0 =A0f->repos_relpath =3D apr_pstrd= up(pool, f->name);=0A>>> +=0A>>>=0A>>> All the tests pass, though I'm not s= ure if there are other correctness=0A>>> issues here or not, so I haven't c= ommitted this.=0A>>=0A>> Just a thought:=0A>> svn_relpath_join() joins two = path/url parts. If one is an empty string, it=0A>> still works. But it cras= hes when one of the parts is NULL instead of an=0A>> empty string.=0A=0AYes= , because NULL is not a valid relpath.=A0 The 'relpath' concept is well def= ined (in svn_dirent_uri.h).=A0 The representation of an empty relpath is th= e empty string.=0A=0AThe real problem here is that find_dir_repos_relpath()= can return NULL whereas its callers (including but not limited to this one= ) expect a non-null value.=0A=0ASo the real solution is either to change fi= nd_dir_repos_relpath() so it always returns a valid 'relpath', or to change= its callers to code around the fact that it can return NULL.=0A=0ADoes it = return NULL to mean the empty relpath or for some other reason?=0A=0A=0A>> = Maybe just rewrite svn_relpath_join() so that NULL is treated as an empty= =0A>> string?=0A=0ANo.=A0 Don't make an exception.=0A=0A- Julian=0A