Return-Path: X-Original-To: apmail-qpid-dev-archive@www.apache.org Delivered-To: apmail-qpid-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 24F6811707 for ; Fri, 27 Jun 2014 10:56:56 +0000 (UTC) Received: (qmail 27976 invoked by uid 500); 27 Jun 2014 10:56:56 -0000 Delivered-To: apmail-qpid-dev-archive@qpid.apache.org Received: (qmail 27944 invoked by uid 500); 27 Jun 2014 10:56:56 -0000 Mailing-List: contact dev-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@qpid.apache.org Delivered-To: mailing list dev@qpid.apache.org Received: (qmail 27926 invoked by uid 99); 27 Jun 2014 10:56:55 -0000 Received: from reviews-vm.apache.org (HELO reviews.apache.org) (140.211.11.40) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 27 Jun 2014 10:56:55 +0000 Received: from reviews.apache.org (localhost [127.0.0.1]) by reviews.apache.org (Postfix) with ESMTP id D31521DB391; Fri, 27 Jun 2014 10:56:44 +0000 (UTC) Content-Type: multipart/alternative; boundary="===============1521505878750477275==" MIME-Version: 1.0 Subject: Re: Review Request 23122: Proton map/hash entries can disappear From: "Rafael Schloming" To: "Rafael Schloming" Cc: "Cliff Jansen" , "qpid" Date: Fri, 27 Jun 2014 10:56:44 -0000 Message-ID: <20140627105644.22595.94387@reviews.apache.org> X-ReviewBoard-URL: https://reviews.apache.org Auto-Submitted: auto-generated Sender: "Rafael Schloming" X-ReviewGroup: qpid X-ReviewRequest-URL: https://reviews.apache.org/r/23122/ X-Sender: "Rafael Schloming" References: <20140627072408.22596.22251@reviews.apache.org> In-Reply-To: <20140627072408.22596.22251@reviews.apache.org> Reply-To: "Rafael Schloming" X-ReviewRequest-Repository: qpid --===============1521505878750477275== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/23122/#review46849 ----------------------------------------------------------- The fix looks good, but it would be nice to see a test case for this. The file src/tests/object.c has a bunch of tests. I'm thinking if you define an object type with a very simple hash, e.g. a string-like object type that always hashes to the first character of the string, then it should be easy to create collisions and reproduce this situation. I think you could do that by just creating a second pn_class_t for string and just override the hash function. - Rafael Schloming On June 27, 2014, 7:24 a.m., Cliff Jansen wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > https://reviews.apache.org/r/23122/ > ----------------------------------------------------------- > > (Updated June 27, 2014, 7:24 a.m.) > > > Review request for qpid and Rafael Schloming. > > > Bugs: PROTON-617 > https://issues.apache.org/jira/browse/PROTON-617 > > > Repository: qpid > > > Description > ------- > > The proposed fix tests for the case of being the first link in a multipart chain and copies the second entry over top and makes the old location of the second entry available for reuse. > > > Diffs > ----- > > http://svn.apache.org/repos/asf/qpid/proton/trunk/proton-c/src/object/object.c 1605943 > > Diff: https://reviews.apache.org/r/23122/diff/ > > > Testing > ------- > > > Thanks, > > Cliff Jansen > > --===============1521505878750477275==--