From dev-return-8064-daniel=haxx.se@subversion.apache.org Thu Dec 2 06:53:33 2010 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on giant.haxx.se X-Spam-Level: X-Spam-Status: No, score=-4.5 required=3.0 tests=BAYES_00,DS_FRIEND, T_RP_MATCHES_RCVD autolearn=ham version=3.3.1 Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by giant.haxx.se (8.14.3/8.14.3/Debian-9.1) with SMTP id oB25rWmP032276 for ; Thu, 2 Dec 2010 06:53:32 +0100 Received: (qmail 77356 invoked by uid 500); 2 Dec 2010 05:53:26 -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 77347 invoked by uid 99); 2 Dec 2010 05:53:25 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 05:53:25 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=10.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS Received-SPF: pass (athena.apache.org: local policy) Received: from [66.111.4.25] (HELO out1.smtp.messagingengine.com) (66.111.4.25) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 02 Dec 2010 05:53:17 +0000 Received: from compute1.internal (compute1.nyi.mail.srv.osa [10.202.2.41]) by gateway1.messagingengine.com (Postfix) with ESMTP id 12E48342; Thu, 2 Dec 2010 00:52:57 -0500 (EST) Received: from frontend2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Thu, 02 Dec 2010 00:52:57 -0500 X-Sasl-enc: g0St5o9h6In9Vw9IwxLe0R9vvBHW8HNpaHacyjwa8ttG83YjO3oIRBCIcmtUKw 1291269176 Received: from daniel3.local (bzq-79-180-20-182.red.bezeqint.net [79.180.20.182]) by mail.messagingengine.com (Postfix) with ESMTPSA id 17BA25E1289; Thu, 2 Dec 2010 00:52:55 -0500 (EST) Date: Thu, 2 Dec 2010 07:51:31 +0200 From: Daniel Shahaf To: Stefan Fuhrmann Cc: dev@subversion.apache.org Subject: Re: svn commit: r1040831 - in /subversion/trunk/subversion: include/svn_checksum.h libsvn_subr/checksum.c Message-ID: <20101202055131.GD3571@daniel3.local> References: <20101130235641.5B68123889ED@eris.apache.org> <20101201032528.GI8686@daniel3.local> <4CF6EAC6.3040805@alice-dsl.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <4CF6EAC6.3040805@alice-dsl.de> User-Agent: Mutt/1.5.18 (2008-05-17) X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.3.5 (giant.haxx.se [80.67.6.50]); Thu, 02 Dec 2010 06:53:33 +0100 (CET) X-Friend: Friend Stefan Fuhrmann wrote on Thu, Dec 02, 2010 at 01:39:34 +0100: > On 01.12.2010 04:25, Daniel Shahaf wrote: >> stefan2@apache.org wrote on Tue, Nov 30, 2010 at 23:56:41 -0000: >>> Author: stefan2 >>> Date: Tue Nov 30 23:56:40 2010 >>> New Revision: 1040831 >>> >>> URL: http://svn.apache.org/viewvc?rev=1040831&view=rev >>> Log: >>> Fix 'svnadmin verify' for format 5 repositories. During the checking process, >>> they yield NULL for SHA1 checksums. The most robust way to fix that is to >>> allow NULL for checksum in svn_checksum_to_cstring. This seems justified >>> as NULL is already a valid return value instead of e.g. an empty string. So, >>> callers may receive NULL as result and could therefore assume that NULL is >>> a valid input, too >>> >> Can you explain how to trigger the bug you are fixing? Just running >> 'svnadmin verify' on my r1040058-created Greek repository doesn't. > Sure: > > $svnadmin-1.5.4 create /mnt/svnroot/test > $ > $svnsync-1.5.4 init file:///mnt/svnroot/test http://svn.apache.org/repos/asf > $svnsync-1.5.4 sync file:///mnt/svnroot/test > $ > $svnadmin-trunk verify /mnt/svnroot/test And then the dump logic calls svn_fs_file_checksum(force=FALSE), which causes a NULL checksum to be returned. Thanks for the recipe; knowing it it's easier to review the fix. Daniel