[issue16384] import.c doesn't handle EOFError from PyMarshal_Read*

Eric Snow report at bugs.python.org
Tue Sep 6 22:22:18 EDT 2016


Eric Snow added the comment:

I have verified that this is still a problem (basically 3.6b1).

Fatal Python error: Py_Initialize: Unable to get the locale encoding
Traceback (most recent call last):
  File "/opt/python3.6/lib/python3.6/encodings/__init__.py", line 99, in search_function
  File "<frozen importlib._bootstrap>", line 979, in _find_and_load
  File "<frozen importlib._bootstrap>", line 968, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 663, in exec_module
  File "<frozen importlib._bootstrap_external>", line 768, in get_code
  File "<frozen importlib._bootstrap_external>", line 478, in _compile_bytecode
EOFError: marshal data too short
Aborted (core dumped)

We should be exiting with an error rather than aborting.

----------
components: +Interpreter Core -None
stage:  -> test needed
versions: +Python 3.6 -Python 3.2

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


More information about the Python-bugs-list mailing list