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

bpo-35193: Fix an off by one error in the RETURN_VALUE case. by gpshead · Pull Request #10418 · python/cpython

gpshead

I don't see how to test for the presence of this out of bounds memory
access issue itself from the level of the CPython interpreter, but this
test will reliably fail (crash) when the interpreter is built using the
clang memory sanitizer.

miss-islington pushed a commit to miss-islington/cpython that referenced this pull request

Nov 9, 2018
…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@7db3c488335168993689ddae5914a28e16188447GH-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)

Co-authored-by: Gregory P. Smith <greg@krypto.org>

gpshead deleted the issue35193_off_by_one_fix branch

November 9, 2018 01:56

miss-islington added a commit that referenced this pull request

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.

7db3c488335168993689ddae5914a28e16188447GH-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)

Co-authored-by: Gregory P. Smith <greg@krypto.org>

gpshead added a commit to gpshead/cpython that referenced this pull request

Nov 9, 2018
…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)

gpshead added a commit that referenced this pull request

Nov 9, 2018

… (GH-10422)

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)