add() in OpenHashSet<T> is broken - may produce multisets
Brought to you by:
bak
When adding a value v1 to an OpenHashSet<T> that already
contains v1, it might happen that this value is added
again.
The problem occurs, when between the first and second
add(v1) another value v2 is removed, which was stored
in the
hash chain leading to v1. The add() operation does not
search the complete hash chain until its end, but insert v1
into the first unoccupied entry. But in the situation
described above, the v1 could be found later on in the hash
chain, and must not be inserted at all.
Logged In: YES
user_id=29238
Seems to be a very similar problem as [770203] "Duplicate
keys allowed in
IntKeyOpenHashMap".
But [905803] it is not fixed in 1.2, I used that version.
Logged In: YES
user_id=43402
Patch #905808 has now been included in TOpenHashSet to
correct Bug #905803. It has also been applied to
TKeyOpenHashMap and TKeySOpenHashMap.
The correction will be released in version 1.3. Thank you very
much for the patch.
Logged In: YES
user_id=43402
Patch #905808 has now been included in TOpenHashSet to
correct Bug #905803. It has also been applied to
TKeyOpenHashMap and TKeySOpenHashMap.
The correction will be released in version 1.3. Thank you very
much for the patch.