Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set.WHICH clashes due to hashing #6495

Open
p6rt opened this issue Sep 5, 2017 · 1 comment
Open

Set.WHICH clashes due to hashing #6495

p6rt opened this issue Sep 5, 2017 · 1 comment
Labels

Comments

@p6rt
Copy link

p6rt commented Sep 5, 2017

Migrated from rt.perl.org#132033 (status was 'new')

Searchable as RT132033$

@p6rt
Copy link
Author

p6rt commented Sep 5, 2017

From zefram@fysh.org

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

@p6rt p6rt added the Bug label Jan 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant