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

* [3.7] 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>
* methane's suggestion

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