[issue34722] Non-deterministic bytecode generation

Chih-Hsuan Yen report at bugs.python.org
Sat Jul 13 09:52:34 EDT 2019


Chih-Hsuan Yen <yan12125 at gmail.com> added the comment:

I encounter another case that leads to non-deterministic bytecode. For example, with commit e6b46aafad3427463d6264a68824df4797e682f1 + PR 9472, I got:

$ cat foobar.py
_m = None
$ PYTHONHASHSEED=0 ./python -m compileall --invalidation-mode=unchecked-hash foobar.py
Compiling 'foobar.py'...
$ sha256sum __pycache__/foobar.cpython-39.pyc
7f84b08d5536390d6ce4ccb2d65e259449c56549ee9cc67560f61771824f20ea  __pycache__/foobar.cpython-39.pyc
$ rm __pycache__/foobar.cpython-39.pyc
$ PYTHONHASHSEED=1 ./python -m compileall --invalidation-mode=unchecked-hash foobar.py
Compiling 'foobar.py'...
$ sha256sum __pycache__/foobar.cpython-39.pyc
46dadbb92ad6e1e5b5f8abe9f107086cd231b2b80c15fe84f86e2081a6b8c428  __pycache__/foobar.cpython-39.pyc

In this case there are no sets. I guess the cause is different. Should I open a new issue?

----------

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


More information about the Python-bugs-list mailing list