Author jdemeyer
Recipients eric.smith, jdemeyer, mark.dickinson, ned.deily, rhettinger, tim.peters
Date 2018-09-21.10:34:24
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1537526064.48.0.956365154283.issue34751@psf.upfronthosting.co.za>
In-reply-to
Content
> So, jdemeyer, if it's possible to show (or describe) to us an example of a problem you had, such that we could repeat it, that would be helpful (and necessary) to evaluate any proposed changes.  What were the inputs to hash() that caused a problem, and how did that problem manifest itself?

In all honesty, I don't remember. This was a while ago and at that time I didn't care enough to put up a CPython bug report. Still, this is a collision for tuples of short length (3) containing small integers (0 and -2). Why do you find that contrived?

What prompted me to report this bug now anyway is that I discovered bad hashing practices for other classes too. For example, meth_hash in Objects/methodobject.c simply XORs two hashes and XOR tends to suffer from catastrophic cancellation. So I was hoping to fix tuple hashing as an example for other hash functions to follow.
History
Date User Action Args
2018-09-21 10:34:24jdemeyersetrecipients: + jdemeyer, tim.peters, rhettinger, mark.dickinson, eric.smith, ned.deily
2018-09-21 10:34:24jdemeyersetmessageid: <1537526064.48.0.956365154283.issue34751@psf.upfronthosting.co.za>
2018-09-21 10:34:24jdemeyerlinkissue34751 messages
2018-09-21 10:34:24jdemeyercreate