[proxy] github.com← back | site home | direct (HTTPS) ↗ | proxy home | ◑ dark◐ light

[3.5] bpo-29537: Tolerate legacy invalid bytecode by ncoghlan · Pull Request #169 · python/cpython

the-knights-who-say-ni

bpo-27286 fixed a problem where BUILD_MAP_UNPACK_WITH_CALL could
be emitted with an incorrect oparg value, causing the eval loop
to access the wrong stack entry when attempting to read the
function name.

The associated magic number change caused significant problems when
attempting to upgrade to 3.5.3 for anyone that relies on pre-cached
bytecode remaining valid across maintenance releases.

This patch restores the ability to import legacy bytecode generated
by 3.5.0, 3.5.1 or 3.5.2 (TODO!), and modifies the eval loop to
avoid any harmful consequences from the potentially malformed legacy
bytecode.

ncoghlan changed the title WIP: [3.5] bpo-29537: Tolerate legacy invalid bytecode [3.5] bpo-29537: Tolerate legacy invalid bytecode

Mar 8, 2017

…-BUILD_MAP_UNPACK_WITH_CALL-bytecode

ncoghlan deleted the bpo29537-handle-legacy-BUILD_MAP_UNPACK_WITH_CALL-bytecode branch

March 30, 2018 07:44

akruis pushed a commit to akruis/cpython that referenced this pull request

Feb 18, 2019
… modules (python#169)

Many extension modules were created by Cython versions before commit
037bcf0 and were compiled with regular C-Python. These modules call
PyEval_EvalFrameEx() with a broken frame object.
This commit add code to recover a broken frame in PyEval_EvalFrameEx().

jaraco pushed a commit that referenced this pull request

Dec 2, 2022