]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
[3.8] bpo-38588: Fix possible crashes in dict and list when calling P… (GH-17764)
authorDong-hee Na <donghee.na92@gmail.com>
Tue, 31 Dec 2019 04:15:36 +0000 (13:15 +0900)
committerPablo Galindo <Pablogsal@gmail.com>
Tue, 31 Dec 2019 04:15:36 +0000 (04:15 +0000)
commit2ee87913dde038436a25f1db13ee3fddd2bcc983
tree506d007f2e4b809e8360d086ba91b50568233980
parenta278ae19b4daa1deb11e2a8eed38838027e90ece
[3.8] bpo-38588: Fix possible crashes in dict and list when calling P… (GH-17764)

* [3.8] bpo-38588: Fix possible crashes in dict and list when calling PyObject_RichCompareBool (GH-17734)

Take strong references before calling PyObject_RichCompareBool to protect against the case
where the object dies during the call.
(cherry picked from commit 2d5bf568eaa5059402ccce9ba5a366986ba27c8a)

Co-authored-by: Dong-hee Na <donghee.na92@gmail.com>
* Update Objects/listobject.c

@methane's suggestion

Co-Authored-By: Inada Naoki <songofacandy@gmail.com>
Co-authored-by: Inada Naoki <songofacandy@gmail.com>
Lib/test/test_dict.py
Lib/test/test_list.py
Misc/NEWS.d/next/Core and Builtins/2019-12-29-19-13-54.bpo-38588.pgXnNS.rst [new file with mode: 0644]
Objects/dictobject.c
Objects/listobject.c