Skip Menu |
Report information
Id: 132033
Status: new
Priority: 0/
Queue: perl6

Owner: Nobody
Requestors: zefram [at]

Severity: (no value)
Tag: Bug
Platform: (no value)
Patch Status: (no value)
VM: (no value)

To: rakudobug [...]
Subject: [BUG] Set.WHICH clashes due to hashing
From: Zefram <zefram [...]>
Date: Tue, 5 Sep 2017 11:56:37 +0100
Download (untitled) / with headers
text/plain 740b
Since commit 167a0edf, Set.WHICH now hashes the concatenated .WHICHes of the set's elements, producing a fixed-size output. This inevitably means that some sets that would otherwise have had distinct .WHICH values will now clash. I can't give an example, because doing so would require constructing a SHA-1 clash, but it is inevitable that clashes will occur by this route. Since === on Sets follows .WHICH, it will perceive Sets to be identical based on hash coincidences. The hashing means that === can only perceive 2**160 distinct Set identities. This is distinct from the problem of Set.WHICH clashes arising from distinct sets of element .WHICHes concatenating to the same string, previously reported as [perl #128943]. -zefram

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

For issues related to this RT instance (aka "perlbug"), please contact perlbug-admin at