Message158784
| Author |
koniiiik |
| Recipients |
PaulMcMillan, Vlado.Boza, dmalcolm, koniiiik, vstinner |
| Date |
2012年04月20日.00:08:30 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1334880511.21.0.818894780597.issue14621@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
@dmalcolm:
As for the gdb example, you need to add --eval-command="set _Py_HashSecret_Initialized=1", otherwise _Py_HashSecret will get overwritten immediately after it is set by gdb, either to 0 if run without the -R switch, or to a random value.
With the fresh pair of values Vlado provided, I managed to reproduce the collisions on Python 2.7.3, i686 (output trimmed like you did):
for __PREFIX in 0x0 0x4700 0xdead00 0xcafe00; do gdb --eval-command="break _PyRandom_Init" --eval-command="run" --eval-command="print _Py_HashSecret" --eval-command="set _Py_HashSecret.prefix=${__PREFIX}" --eval-command="set _Py_HashSecret_Initialized=1" --eval-command="print _Py_HashSecret" --eval-command="continue" -eval-command="continue" --args ./python -c "a='\x00\xcf\x0b\x96\x19'; b='\x00\x6d\x29\x45\x18'; print(hash(a)); print(hash(b))"; done
1ドル = {prefix = 0, suffix = 0}
2ドル = {prefix = 0, suffix = 0}
Continuing.
1220138288
1220138288
1ドル = {prefix = 0, suffix = 0}
2ドル = {prefix = 18176, suffix = 0}
Continuing.
-1483212240
-1483212240
1ドル = {prefix = 0, suffix = 0}
2ドル = {prefix = 14593280, suffix = 0}
Continuing.
-972665808
-972665808
1ドル = {prefix = 0, suffix = 0}
2ドル = {prefix = 13303296, suffix = 0}
Continuing.
1003122480
1003122480 |
|
History
|
|---|
| Date |
User |
Action |
Args |
| 2012年04月20日 00:08:31 | koniiiik | set | recipients:
+ koniiiik, vstinner, dmalcolm, PaulMcMillan, Vlado.Boza |
| 2012年04月20日 00:08:31 | koniiiik | set | messageid: <1334880511.21.0.818894780597.issue14621@psf.upfronthosting.co.za> |
| 2012年04月20日 00:08:30 | koniiiik | link | issue14621 messages |
| 2012年04月20日 00:08:30 | koniiiik | create |
|