Author dmalcolm
Recipients Vlado.Boza, dmalcolm, haypo, koniiiik
Date 2012-04-19.21:31:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1334871067.72.0.448739112644.issue14621@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2012-04-19 21:31:07dmalcolmsetrecipients: + dmalcolm, haypo, Vlado.Boza, koniiiik
2012-04-19 21:31:07dmalcolmsetmessageid: <1334871067.72.0.448739112644.issue14621@psf.upfronthosting.co.za>
2012-04-19 21:31:07dmalcolmlinkissue14621 messages
2012-04-19 21:31:07dmalcolmcreate