cpython/Objects
Pablo Galindo 526ef856dd
[3.8] bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) (GH-16662)
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>
2019-10-08 21:38:11 +01:00
..
clinic [3.8] bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) (GH-16141) 2019-09-14 13:31:50 +03:00
stringlib Doc: Fix typo in fastsearch comments (GH-14608) (GH-15933) 2019-09-11 15:05:49 +02:00
README Issue #18093: Factor out the programs that embed the runtime 2014-07-25 21:52:14 +10:00
abstract.c bpo-20092. Use __index__ in constructors of int, float and complex. (GH-13108) 2019-06-02 00:05:48 +03:00
accu.c bpo-35081: Move accu.h to Include/internal/pycore_accu.h (GH-10271) 2018-11-01 02:30:36 +01:00
boolobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
bytearrayobject.c [3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) (GH-15635) 2019-09-01 14:01:05 +03:00
bytes_methods.c bpo-38383: Fix possible integer overflow in startswith() of bytes and bytearray. (GH-16603) 2019-10-06 05:37:20 -07:00
bytesobject.c [3.8] bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) (GH-16141) 2019-09-14 13:31:50 +03:00
call.c [3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (#14782) 2019-07-23 12:39:51 +02:00
capsule.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
cellobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
classobject.c bpo-37233: optimize method_vectorcall in case of totalargs == 0 (GH-14550) 2019-07-03 06:06:38 -07:00
codeobject.c bpo-37221: Add PyCode_NewWithPosOnlyArgs to be used internally and set PyCode_New as a compatibility wrapper (GH-13959) (#14505) 2019-07-01 13:29:14 +02:00
complexobject.c bpo-37236: pragma optimize off for _Py_c_quot on Windows arm64 (GH-13983) 2019-06-12 11:27:15 -07:00
descrobject.c [3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) (GH-15635) 2019-09-01 14:01:05 +03:00
dict-common.h bpo-33312: Fix clang ubsan out of bounds warnings in dict. (GH-6537) 2018-04-19 22:41:19 -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:13:36 -07:00
enumobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
exceptions.c [3.8] bpo-37757: Disallow PEP 572 cases that expose implementation details (GH-15491) 2019-08-26 00:41:47 +10:00
fileobject.c [3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) (GH-15635) 2019-09-01 14:01:05 +03:00
floatobject.c [3.8] bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) (GH-16141) 2019-09-14 13:31:50 +03:00
frameobject.c [3.8] bpo-37830: Fix compilation of break and continue in finally. (GH-15320) (GH-15456) 2019-08-24 13:41:53 +03:00
funcobject.c Restore tp_clear for function object. (#16502) 2019-10-01 09:49:36 +02:00
genobject.c bpo-30773: Fix ag_running; prohibit running athrow/asend/aclose in parallel (GH-7468) (#16486) 2019-09-29 23:19:02 -07:00
interpreteridobject.c bpo-38005: Remove support of string argument in InterpreterID(). (GH-16227) 2019-09-25 08:56:05 -07:00
iterobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
listobject.c Improve docstring of list.sort (GH-8516) 2019-05-31 21:10:02 -07:00
listsort.txt Fix typos mostly in comments, docs and test names (GH-15209) 2019-08-30 13:42:54 -07:00
lnotab_notes.txt bpo-38115: Deal with invalid bytecode offsets in lnotab (GH-16079) (GH-16464) 2019-09-28 08:22:00 -07:00
longobject.c bpo-38096: Clean up the "struct sequence" / "named tuple" docs (GH-15895) (GH-15961) 2019-09-11 19:50:29 -07:00
memoryobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
methodobject.c [3.8] bpo-36974: separate vectorcall functions for each calling convention (GH-13781) (#14782) 2019-07-23 12:39:51 +02:00
moduleobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
namespaceobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
object.c [3.8] bpo-38070: Py_FatalError() logs runtime state (GH-16258) 2019-09-18 14:10:16 +02:00
obmalloc.c bpo-37732: Fix GCC warning in _PyObject_Malloc() (GH-15333) (GH-15342) 2019-08-20 13:44:32 +01:00
odictobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
picklebufobject.c bpo-36785: PEP 574 implementation (GH-7076) 2019-05-26 17:10:09 +02:00
rangeobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
setobject.c [3.8] bpo-37994: Fix silencing all errors if an attribute lookup fails. (GH-15630) (GH-15635) 2019-09-01 14:01:05 +03:00
sliceobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
structseq.c [3.8] bpo-37206: Unrepresentable default values no longer represented as None. (GH-13933) (GH-16141) 2019-09-14 13:31:50 +03:00
tupleobject.c bpo-36974: tp_print -> tp_vectorcall_offset and tp_reserved -> tp_as_async (GH-13464) 2019-05-30 19:13:39 -07:00
typeobject.c [3.8] bpo-37879: Suppress subtype_dealloc decref when base type is a C heap type (GH-15323, GH-16004) (GH-15966) 2019-09-12 10:44:46 +01: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 bpo-38236: Dump path config at first import error (GH-16300) (GH-16332) 2019-09-23 15:59:00 +02:00
unicodetype_db.h closes bpo-36861: Update Unicode database to 12.1.0. (GH-13214) 2019-05-08 20:59:35 -07:00
weakrefobject.c [3.8] bpo-38395: Fix ownership in weakref.proxy methods (GH-16632) (GH-16662) 2019-10-08 21:38:11 +01:00

README

Source files for various builtin objects