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

Martin v. Löwis report at bugs.python.org
Sat Nov 17 16:41:26 CET 2012


Martin v. Löwis added the comment:

IMO, the right solution is to finish PEP 3154, and support large strings in the format.

For the time being, I'd claim that signed length in the existing implementations are just a bug, and that unsigned lengths are the intended semantics of these opcodes. I can't see anything that is gained by allowing negative lengths.

OTOH, I also think that it won't matter much in practive: if you try to unpickle a string with more than 2GiB on a 32-bit system, chances are really high that you run out of memory. So whether any bug fix needs to be backported, I don't know.

----------

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


More information about the Python-bugs-list mailing list