This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author rthalley
Recipients
Date 2004-10-25.22:32:06
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
There is a serious hashing error in 2.4b1.  I don't know if the 
error is confined to 64-bit systems, or is a general problem. 
 
The program attached to this report produces, as expected, 
this output when run with python 2.3.3: 
 
Python: 20303f0 
System: Linux localhost 2.6.8-1.521 #1 Mon Aug 16 09:01:00 
EDT 2004 x86 
_64 x86_64 x86_64 GNU/Linux 
 
hash("DNSSEC") == -7602892900506903802 
 
hash("D") == 8704026181 
hash("DN") == 8704052292078464 
hash("DNS") == -2784798555566127274 
hash("DNSS") == 5809125768486327656 
hash("DNSSE") == 5232635463381381892 
hash("DNSSEC") == -7602892900506903802 
 
When run with 2.4b1, I get the following output: 
 
Python: 20400b1 
System: Linux localhost 2.6.8-1.521 #1 Mon Aug 16 09:01:00 
EDT 2004 x86 
_64 x86_64 x86_64 GNU/Linux 
 
hash("DNSSEC") == -7602892900506903802 
 
hash("D") == 8704026181 
hash("DN") == 8704052292078464 
hash("DNS") == 8704052292078464 
hash("DNSS") == 8704052292078464 
hash("DNSSE") == 8704052292078464 
hash("DNSSEC") == 8704052292078464 
Traceback (most recent call last): 
  File "foo.py", line 22, in ? 
    assert hb == ha, 'hashes do not match!' 
AssertionError: hashes do not match! 
 
The way I discovered this was that dnspython's regression 
suite started failing because the string 'DNSSEC' constructed 
character-by-character was not being found in a dictionary 
which had a 'DNSSEC' key. 
 
I have not yet found the underlying bug; I was focussing on 
getting the info needed to demonstrate the bug first, since 
it's so serious.  If I make any progress fixing it, I'll send a 
patch. 
 
/Bob 
 
History
Date User Action Args
2007-08-23 14:27:03adminlinkissue1054139 messages
2007-08-23 14:27:03admincreate