[issue19219] speed up marshal.loads()

Kristján Valur Jónsson report at bugs.python.org
Fri Oct 11 14:31:48 CEST 2013


Kristján Valur Jónsson added the comment:

Anyway, whether or not Pyhon guarantees this and that wrt. "untrusted" is beside the point and offtopic, as Victor poitns out.

However:  We are, and have always been, careful to fail gracefully if we detect data corruption.  Never should the flipping of a bit on a file on the disk cause our program to crash.  It is fine when reading a corrupt file that an int(1) turns to int(2), or that we get an UnmarshalError when reading it, or that a "hello world" string turns to "hello $orld".  What is not good is if the reading of the corrupt string causes the interpreter to crash.

My knowledge of the new unicode internals is limited at best.  If you don't think, Antoine, that putting non-7-bit data into the supposedly 7 bit ascii unicode data can cause an actual crash, but at worst a corrupt string, then I'm quite happy, personally :)

----------

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


More information about the Python-bugs-list mailing list