[issue12848] pickle.py treats 32bit lengths as signed, but _pickle.c as unsigned

Serhiy Storchaka report at bugs.python.org
Thu Nov 15 23:17:16 CET 2012


Serhiy Storchaka added the comment:

The C implementation writes and reads BINBYTES and BINUNICODE up to 4G (on 64-bit platform). The Python implementation writes and reads BINBYTES and BINUNICODE up to 2G. What should be compatible fix? Allow the Python implementation to write and read up to 4G? Then Python can pickle a large data which can't be unpickled on non-patched Python (and on 2.7). Limit size to 2G? Then non-patched Python (including 3.1) can pickle a data which can't be unpickled on patched Python.

Also there is an unpleasant fact that 64-bit Python can pickle data which can't unpickle 32-bit Python.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12848>
_______________________________________


More information about the Python-bugs-list mailing list