cpython/Objects
Pablo Galindo 193366e25c [3.7] bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) (GH-16663)
The implementation of weakref.proxy's methods call back into the Python
API using a borrowed references of the weakly referenced object
(acquired via PyWeakref_GET_OBJECT). This API call may delete the last
reference to the object (either directly or via GC), leaving a dangling
pointer, which can be subsequently dereferenced.

To fix this, claim a temporary ownership of the referenced object when
calling the appropriate method. Some functions because at the moment they
do not need to access the borrowed referent, but to protect against
future changes to these functions, ownership need to be fixed in
all potentially affected methods..
(cherry picked from commit 10cd00a9e3)

Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>





https://bugs.python.org/issue38395
2019-10-11 13:28:49 -07:00
..
clinic [3.7] bpo-38409: Fix grammar in str.strip() docstring (GH-16682) (GH-16686) 2019-10-09 16:56:07 -05:00
stringlib [3.7] bpo-24214: Fixed the UTF-8 and UTF-16 incremental decoders. (GH-14304) (GH-14369) 2019-06-25 12:29:18 +02:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
abstract.c bpo-35992: Use PySequence_GetItem only if sq_item is not NULL (GH-11857) 2019-02-17 15:33:04 -08:00
accu.c Replace KB unit with KiB (#4293) 2017-11-08 14:44:44 -08:00
boolobject.c bpo-30592: Fixed error messages for some builtins. (#1996) 2017-06-08 14:41:19 +03:00
bytearrayobject.c bpo-37417: Fix error handling in bytearray.extend. (GH-14407) 2019-06-26 12:23:19 -07:00
bytes_methods.c bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603) 2019-10-06 05:36:44 -07:00
bytesobject.c bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375) 2019-05-17 00:33:10 -07:00
call.c bpo-36907: fix refcount bug in _PyStack_UnpackDict() (GH-13381) (GH-13493) 2019-05-22 14:52:13 +02:00
capsule.c bpo-35436: Add missing PyErr_NoMemory() calls and other minor bug fixes. (GH-11015) (GH-11020) 2018-12-07 14:17:43 +02:00
cellobject.c bpo-33029: Fix signatures of getter and setter functions. (GH-10746) 2018-11-27 09:58:07 -08:00
classobject.c bpo-35444: Fix error handling when fail to look up builtin "getattr". (GH-11047) (GH-11107) 2018-12-11 10:51:27 +02:00
codeobject.c bpo-24618: Add a check in the code constructor. (GH-8283) 2018-07-16 00:09:44 -07:00
complexobject.c bpo-31979: Simplify transforming decimals to ASCII (#4336) 2017-11-13 21:23:48 +02:00
descrobject.c bpo-36433: fix confusing error messages in classmethoddescr_call (GH-12556) 2019-03-26 02:47:08 -07:00
dict-common.h bpo-33312: Fix clang ubsan out of bounds warnings in dict. (GH-6537) (GH-6543) 2018-04-20 10:06:21 -07:00
dictnotes.txt Issue #15055: update dictnotes.txt. Patch by Mark Shannon. 2012-06-24 21:03:45 +02:00
dictobject.c Fix typo in dict object comment (GH-15814) 2019-09-10 03:15:43 -07:00
enumobject.c bpo-31579: Fixed a possible leak in enumerate() with large indices. (#3753) 2017-09-26 08:14:58 +03:00
exceptions.c bpo-33029: Fix signatures of getter and setter functions. (GH-10746) 2018-11-27 09:58:07 -08:00
fileobject.c bpo-36251: Fix format strings used in match_repr() and stdprinter_repr(). (GH-12252) 2019-03-10 03:52:44 -07:00
floatobject.c bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15962) 2019-09-11 19:50:51 -07:00
frameobject.c bpo-35504: Fix segfaults and SystemErrors when deleting certain attrs. (GH-11175) 2018-12-17 07:10:20 -08:00
funcobject.c bpo-33029: Fix signatures of getter and setter functions. (GH-10746) 2018-11-27 09:58:07 -08:00
genobject.c bpo-38013: make async_generator_athrow object tolerant to throwing exceptions (GH-16070) 2019-09-17 06:19:25 -07:00
iterobject.c bpo-30860: Consolidate stateful runtime globals. (#3397) 2017-09-07 23:51:28 -06:00
listobject.c bpo-36946:Fix possible signed integer overflow when handling slices. (GH-15639) 2019-09-08 03:36:38 -07:00
listsort.txt bpo-28685: Optimize sorted() list.sort() with type-specialized comparisons (#582) 2018-01-28 19:03:23 -08:00
lnotab_notes.txt bpo-28810: Update lnotab_notes.txt (#665) 2017-03-14 21:42:09 +02:00
longobject.c bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15962) 2019-09-11 19:50:51 -07:00
memoryobject.c bpo-33029: Fix signatures of getter and setter functions. (GH-10746) 2018-11-27 09:58:07 -08:00
methodobject.c bpo-35444: Fix error handling when fail to look up builtin "getattr". (GH-11047) (GH-11107) 2018-12-11 10:51:27 +02:00
moduleobject.c [3.7] Fix misleading mentions of tp_size in comments. (GH-9136) 2018-09-10 10:22:55 -07:00
namespaceobject.c bpo-35454: Fix miscellaneous minor issues in error handling. (GH-11077) 2018-12-10 23:05:13 -08:00
object.c bpo-36745: Fix a possible reference leak in PyObject_SetAttr() (GH-12993) 2019-04-28 06:17:40 -07:00
obmalloc.c bpo-37732: Fix GCC warning in _PyObject_Malloc() (GH-15333) (GH-15342) (GH-15343) 2019-08-20 15:29:08 +01:00
odictobject.c [3.7] bpo-36254: Fix invalid uses of %d in format strings in C. (GH-12264). (GH-12322) 2019-03-14 10:47:27 +02:00
rangeobject.c bpo:34848 : Correct an incorrect docstring for range().index method (GH-9877) 2019-05-03 05:39:17 -07:00
setobject.c [3.7] bpo-37219: Remove erroneous optimization for differencing an empty set (GH-13965) (GH-13968) 2019-06-11 02:01:06 -07:00
sliceobject.c bpo-35961: Fix a crash in slice_richcompare() (GH-11830) 2019-02-13 03:49:34 -08:00
structseq.c bpo-38096: Complete the "structseq" and "named tuple" cleanup (GH-16010) (GH-16063) 2019-09-12 08:20:07 -07:00
tupleobject.c bpo-36946: Fix possible signed integer overflow when handling slices. (GH-13375) 2019-05-17 00:33:10 -07:00
typeobject.c [3.7] Fix a possible crash due to PyType_FromSpecWithBases() (GH-10304) (GH-13495) 2019-05-28 23:35:33 -04:00
typeslots.inc add Py_tp_finalize slot (closes #24345) 2015-06-01 10:12:48 -05:00
typeslots.py Issue #26662: Set PYTHON_FOR_GEN in configure 2016-07-26 12:48:08 +02:00
unicodectype.c Removed unintentional trailing spaces in non-external and non-generated C files. 2015-03-18 21:53:15 +02:00
unicodeobject.c [3.7] bpo-38409: Fix grammar in str.strip() docstring (GH-16682) (GH-16686) 2019-10-09 16:56:07 -05:00
unicodetype_db.h update to Unicode 11.0.0 (closes bpo-33778) (GH-7439) (GH-7470) 2018-06-07 03:36:22 -04:00
weakrefobject.c [3.7] bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) (GH-16663) 2019-10-11 13:28:49 -07:00

README

Source files for various builtin objects