Skip to content

[3.6] bpo-35193: Fix an off by one error in the RETURN_VALUE case. (GH-10418) #10422

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 9, 2018

Conversation

gpshead
Copy link
Member

@gpshead gpshead commented Nov 9, 2018

Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return.

Do a bounds check within find_op so it can return before going past the end as a safety measure.

7db3c48#diff-a33329ae6ae0bb295d742f0caf93c137
introduced this off by one error while fixing another one nearby.

This bug was shipped in all Python 3.6 and 3.7 releases.

The included unittest won't fail unless you do a clang msan build.

(cherry picked from commit 49fa4a9)

https://bugs.python.org/issue35193

…H-10418)

Fix an off by one error in the peephole optimizer when checking for unreachable code beyond a return.

Do a bounds check within find_op so it can return before going past the end as a safety measure.

python@7db3c48#diff-a33329ae6ae0bb295d742f0caf93c137
introduced this off by one error while fixing another one nearby.

This bug was shipped in all Python 3.6 and 3.7 releases.

The included unittest won't fail unless you do a clang msan build.

(cherry picked from commit 49fa4a9)
@bedevere-bot bedevere-bot added the type-bug An unexpected behavior, bug, or error label Nov 9, 2018
@gpshead gpshead self-assigned this Nov 9, 2018
@gpshead gpshead merged commit 65e1a1f into python:3.6 Nov 9, 2018
@gpshead gpshead deleted the backport-bpo-issue35193-3.6 branch November 9, 2018 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type-bug An unexpected behavior, bug, or error
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants