[issue32011] Restore loading of TYPE_INT64 in marshal

Serhiy Storchaka report at bugs.python.org
Sun Nov 12 13:54:36 EST 2017


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

Example:

$ python2 -c 'import sys, marshal; marshal.dump(1234567890, sys.stdout)' | python3 -c 'import sys, marshal; print(marshal.load(sys.stdin.buffer))'
1234567890

$ python2 -c 'import sys, marshal; marshal.dump(123456789012345, sys.stdout)' | python3 -c 'import sys, marshal; print(marshal.load(sys.stdin.buffer))'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
ValueError: bad marshal data (unknown type code)

 python2 -c 'import sys, marshal; marshal.dump(12345678901234567890, sys.stdout)' | python3 -c 'import sys, marshal; print(marshal.load(sys.stdin.buffer))'
12345678901234567890

PR 4381 reverts this change and simplifies the restored code.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32011>
_______________________________________


More information about the Python-bugs-list mailing list