cpython/Objects
Victor Stinner 9e23f0a27c
[3.7] bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770) (GH-12788)
* bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770)

Replace _PyMem_IsFreed() function with _PyMem_IsPtrFreed() inline
function. The function is now way more efficient, it became a simple
comparison on integers, rather than a short loop. It detects also
uninitialized bytes and "forbidden bytes" filled by debug hooks
on memory allocators.

Add unit tests on _PyObject_IsFreed().

(cherry picked from commit 2b00db6855)

* bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)

Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD,
0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte
patterns than Windows CRT debug malloc() and free().

(cherry picked from commit 4c409beb4c)
2019-04-11 22:30:31 +02:00
..
clinic bpo-32677: Add .isascii() to str, bytes and bytearray (GH-5342) 2018-01-27 14:06:21 +09:00
stringlib bpo-33954: Fix _PyUnicode_InsertThousandsGrouping() (GH-10623) (GH-10718) 2018-11-26 14:17:01 +01:00
README
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-34974: Do not replace unexpected errors in bytes() and bytearray(). (GH-9852) 2018-10-14 14:26:28 -07:00
bytes_methods.c bpo-32677: Optimize str.isascii() (GH-5356) 2018-01-28 09:59:12 +09:00
bytesobject.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
call.c bpo-32240: Add the const qualifier to declarations of PyObject* array arguments. (#4746) 2017-12-15 13:11:11 +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
dictobject.c bpo-34320: Fix dict(o) didn't copy order of dict subclass (GH-8624) 2018-09-25 21:17:52 -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 Fix typo and edit for clarity in the docstrings of sys.float_info. (GH-2251) 2018-03-26 03:58:10 -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-33029: Fix signatures of getter and setter functions. (GH-10746) 2018-11-27 09:58:07 -08:00
iterobject.c bpo-30860: Consolidate stateful runtime globals. (#3397) 2017-09-07 23:51:28 -06:00
listobject.c bpo-36218: Fix handling of heterogeneous values in list.sort (GH-12209) GH-12532) 2019-03-25 00:47:55 -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-34899: Fix a possible assertion failure due to int_from_bytes_impl() (GH-9705) 2018-10-05 14:28:56 -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 [3.7] bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770) (GH-12788) 2019-04-11 22:30:31 +02:00
obmalloc.c [3.7] bpo-36389: _PyObject_IsFreed() now also detects uninitialized memory (GH-12770) (GH-12788) 2019-04-11 22:30:31 +02: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 Fix a possible crash in range.__reversed__(). (GH-10252) 2018-10-31 02:31:29 -07:00
setobject.c bpo-1621: Avoid signed integer overflow in set_table_resize() (GH-9059) (GH-9198) 2018-10-20 00:50:34 +02:00
sliceobject.c bpo-35961: Fix a crash in slice_richcompare() (GH-11830) 2019-02-13 03:49:34 -08:00
structseq.c bpo-36365: Fix compiler warning in structseq.c (GH-12451) 2019-03-20 00:32:11 +01:00
tupleobject.c closes bpo-32898: Fix debug build crash with COUNT_ALLOCS (GH-5800) 2018-02-21 21:44:08 -08:00
typeobject.c bpo-31506: Clarify error messages for object.__new__ and object.__init__ (GH-11641) 2019-02-19 05:47:13 -08:00
typeslots.inc
typeslots.py Issue #26662: Set PYTHON_FOR_GEN in configure 2016-07-26 12:48:08 +02:00
unicodectype.c
unicodeobject.c bpo-24214: Fixed the UTF-8 incremental decoder. (GH-12603) (GH-12627) 2019-03-30 15:52:41 +02: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 bpo-30592: Fixed error messages for some builtins. (#1996) 2017-06-08 14:41:19 +03:00

README

Source files for various builtin objects