GeezerVison is showing github.com — [3.5] bpo-29537: Tolerate legacy invalid bytecode by ncoghlan · Pull Request #169 · python/cpython
Conversation
ncoghlan
commented
Feb 19, 2017
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
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, and modifies the eval loop to
avoid any harmful consequences from the potentially malformed legacy
bytecode.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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.
|
On the bug you say it only makes sense to push this with my patch to accept old bytecode.
That patch is at encukou@magic-number-workaround . It's meant to be one-off, and includes redundant sanity checks that it's patching the right magic number.
What should I do to help? Submit it as PR for review, or rework it somehow?
If you want to include it in your PR, consider the patch a contribution under Python's CLA, which I signed.
|
ncoghlan reacted with thumbs up emoji
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
|
@encukou Thanks, I'll bring it in under those terms and make a combined PR with both changes.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
codecov
Bot
commented
Feb 24, 2017
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
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
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().
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
type-bug
An unexpected behavior, bug, or error
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|