]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-35961: Fix a crash in slice_richcompare() (GH-11830)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 13 Feb 2019 11:49:34 +0000 (03:49 -0800)
committerGitHub <noreply@github.com>
Wed, 13 Feb 2019 11:49:34 +0000 (03:49 -0800)
commita78251e2d6de37f46c230be924032a87df730761
tree6682d22a577c31966a95f0c9a482f37525098997
parent00cc0fe177506c908c34c92d6defaba50e2213f4
bpo-35961: Fix a crash in slice_richcompare() (GH-11830)

Fix a crash in slice_richcompare(): use strong references rather than
stolen references for the two temporary internal tuples.

The crash (or assertion error) occurred if a garbage collection
occurred during slice_richcompare(), especially while calling
PyObject_RichCompare(t1, t2, op).
(cherry picked from commit dcb68f47f74b0cc8a1896d4a4c5a6b83c0bbeeae)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Misc/NEWS.d/next/Core and Builtins/2019-02-12-20-16-34.bpo-35961.7f7Sne.rst [new file with mode: 0644]
Objects/sliceobject.c