Martin Panter added the comment: Thanks for your testing Serhiy. I can reproduce this on 32-bit Linux (also by building with CC="gcc -m32"). It is easy to produce the bug with flush(), but with Decompress.decompress() it would need over 2 GiB of memory and data to expand the buffer enough to trigger the error.
>>> zlib.decompressobj().flush(sys.maxsize + 1) SystemError: Negative size passed to PyBytes_FromStringAndSize In zlib-Py_ssize_t.patch, I added the bigmem tests, but I am not able to actually test them. The gzip test would require 8 GiB of memory. I also changed the converter to Py_ssize_t to fix this latest bug. ---------- Added file: http://bugs.python.org/file41096/zlib-Py_ssize_t.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25626> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com