[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

RE: apr_hash_overlay returns hash with duplicate keys

From: Bert Huijben <bert_at_qqmail.nl>
Date: Thu, 10 Dec 2015 18:01:57 +0100

Are both hash tables created with the same hash function? (I think stefan2 introduced some variants).

Otherwise I would expect some key values to be changed somewhere after adding to the first hashtable… But I don’t think this is really a likely scenario.

Sent from Outlook Mail for Windows 10 phone

From: Julian Foad
Sent: donderdag 10 december 2015 17:15
To: APR devel
Cc: dev
Subject: apr_hash_overlay returns hash with duplicate keys

APR devs, Subversion devs:

On Subversion's Mac OS buildbots it appears that apr_hash_overlay()
sometimes returns a hash containing duplicate keys, which (as I
understand it) should be impossible.

We had an issue where some 'svnmover' tests were failing only on Mac
OS buildbots. I added some debugging in Subversion commits r1719056,
r1719067, r1719072, r1719074.

Buildbot result:
    --> debug output in 'faillog' shows duplicate keys in hash:
       "union_children={A, iota, foo, boozle, boozle, iota}"

I replaced apr_hash_overlay() with my own simple re-implementation:

    http://svn.apache.org/r1719089 -- re-implement hash overlay

Buildbot result:
    --> tests pass
    (in this step 5 of the buildbot; other tests still fail in steps 4 and 6)

The bot's config-log shows APR v1.4.5, APR-util v1.3.12.

Next questions should be: Is this a known bug? Can we reproduce it in
a small test case?

- Julian
Received on 2015-12-10 18:02:11 CET

This is an archived mail posted to the Subversion Dev mailing list.