[issue14888] _md5 module crashes on large data

2012-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: I've now pushed the fix. Jesus, if you want to propose a test and patch for the _sha1 issue, please open a separate issue. Thanks! -- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed __

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 290d970c011d by Antoine Pitrou in branch '2.7': Issue #14888: Fix misbehaviour of the _md5 module when called on data larger than 2**32 bytes. http://hg.python.org/cpython/rev/290d970c011d -- nosy: +python-dev

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > sha1 fails the same way. Same error. Just clone the test to show it. > > Please, correct sha1 too and add a test for it :). Well, do you want to provide an updated patch? -- ___ Python tracker

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Same can be said about Python 3 hash modules: they are not using the sanity check, so they work. Maybe the real question should be if the sanity check really makes sense at all. If not, remove everywhere (the calculated md5 with no checks looks correct, aft

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: sha224, sha256, sha384 and sha512 are not failing because they are missing the "Py_SAFE_DOWNCAST" safety net completely. So I would tell that we have an issue here :). -- ___ Python tracker

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: sha1 fails the same way. Same error. Just clone the test to show it. Please, correct sha1 too and add a test for it :). sha224, sha256, sha384 and sha512 seems OK. -- ___ Python tracker

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: I can't reproduce this issue in my 64 bit machines, neither in Solaris neither in Ubuntu. I guess the assertion can be fooled by compiler optimizacions. As a consequence, I can't check other hashes functions. Antoine, can you reproduce it doing "md5.new("A"*

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > I can't reproduce this issue in my 64 bit machines, neither in Solaris > neither in Ubuntu. I guess the assertion can be fooled by compiler > optimizacions. You should compile in debug mode. -- ___ Python tracker

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: > Does this affect other hash modules? I don't know, only md5 seems to have tests for large data. > . Why is this not affecting python 3? The _md5 module was apparently rewritten in Python 3. -- ___ Python tracker

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Does this affect other hash modules?. Why is this not affecting python 3? Patch looks good. -- nosy: +jcea ___ Python tracker ___ ___

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- keywords: +patch Added file: http://bugs.python.org/file25679/md5_huge.patch ___ Python tracker ___ ___

[issue14888] _md5 module crashes on large data

2012-05-23 Thread Antoine Pitrou
New submission from Antoine Pitrou : This appears to be 2.7-only: $ ./python -m test.regrtest -M5G -v test_hashlib == CPython 2.7.3+ (2.7:086afe7b61f5, May 23 2012, 15:15:34) [GCC 4.5.2] == Linux-2.6.38.8-desktop-10.mga-x86_64-with-mandrake-1-Official little-endian == /home/antoine/cpython/2