Dave Malcolm <[email protected]> added the comment:
Thanks for filing this bug report.
I'm not seeing the equal hashes you describe.
I'm using this recipe to hardcode a specific prefix and print the hashes using
it:
$ gdb --eval-command="break _PyRandom_Init" --eval-command="run"
--eval-command="print _Py_HashSecret" --eval-command="set
_Py_HashSecret.prefix=0xcdcdcdcd" --eval-command="print _Py_HashSecret"
--eval-command="continue" -eval-command="continue" --args python -c
"a='\x27\xfd\x5a\x18'; b='\x26\xfe\x78\xfa'; print(hash(a)); print(hash(b))"
On a 32-bit build of Python 2.7.3 (i686), if I set
_Py_HashSecret.prefix=0xcdcdcdcd, I get non-equal hashes for the data you
specify (output trimmed somewhat for conciseness):
$1 = {prefix = 0, suffix = 0}
$2 = {prefix = -842150451, suffix = 0}
Continuing.
-121255142
-1199906326
Similarly, on a 64-bit build of Python 2.7.3 (x86_64), I get non-equal hashes:
$1 = {prefix = 0, suffix = 0}
$2 = {prefix = 3452816845, suffix = 0}
-3992804574342296806
-8147489705433570838
Did I misunderstand the report? Thanks.
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue14621>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com