Message188255
Taking part on a contest I found a bug working with a string of 6227020800 characters, all the characters are the 'a' char.
When I execute:
hashlib.md5(string).hexdigest()
On Python, is takes a pair of seconds (need more to calculate this md5, I think that it crashes without launch any exception), and returns the hash:
8adbd18519be193db41dd5341a260963
When I execute the same code using Pypy the hash is:
38fe0c01bfa0eb9d153b034f8408a8b7
In order to know witch one is the correct hash, I created a file with 6227020800 characters on my system and I executed the "md5" of OpenSSL, I think that we can trust on it, obtaining the same result as Pypy:
unknown7cd1c3ecbb9b:Downloads socialpoint$ wc -c md5_test
6227020800 md5_test
unknown7cd1c3ecbb9b:Downloads socialpoint$ md5 md5_test
MD5 (md5_test) = 38fe0c01bfa0eb9d153b034f8408a8b7
Then Python are doing something wrong.
Pls, find attached a screenshot that shows the result of the tests. If you can't reproduce it, or need more information, please let me know.
My Python version:
Python 2.7.1 (r271:86832, Aug 5 2011, 03:30:24)
[GCC 4.2.1 (Based on Apple Inc. build 5658) (LLVM build 2335.15.00)] on darwin
Pypy version:
Python 2.7.2 (341e1e3821ff, Jun 07 2012, 15:42:54)
[PyPy 1.9.0 with GCC 4.2.1] on darwin |
|
Date |
User |
Action |
Args |
2013-05-02 08:08:09 | Alonso.Vidales | set | recipients:
+ Alonso.Vidales |
2013-05-02 08:08:09 | Alonso.Vidales | set | messageid: <1367482089.28.0.00515501399845.issue17891@psf.upfronthosting.co.za> |
2013-05-02 08:08:09 | Alonso.Vidales | link | issue17891 messages |
2013-05-02 08:08:08 | Alonso.Vidales | create | |
|