[issue34990] year 2038 problem in compileall.py

Bernhard M. Wiedemann report at bugs.python.org
Mon Oct 15 07:22:16 EDT 2018


New submission from Bernhard M. Wiedemann <pythonbugs at lsmod.de>:

To reproduce:
touch -d 2038-01-20 /usr/lib/python3.6/site-packages/six.py
python3 /usr/lib64/python3.6/compileall.py


  File "/usr/lib64/python3.6/compileall.py", line 198, in compile_path
    legacy=legacy, optimize=optimize)
  File "/usr/lib64/python3.6/compileall.py", line 90, in compile_dir
    legacy, optimize):
  File "/usr/lib64/python3.6/compileall.py", line 138, in compile_file
    mtime)
struct.error: 'l' format requires -2147483648 <= number <= 2147483647

It could use either 
64 bit int (requires new .pyc format with different magic number) or
unsigned 32 bit int (gives us only another 68 years)

----------
components: Build
messages: 327743
nosy: bmwiedemann
priority: normal
severity: normal
status: open
title: year 2038 problem in compileall.py
type: compile error
versions: Python 3.6, Python 3.7

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


More information about the Python-bugs-list mailing list