cpython/Doc/c-api
Miss Islington (bot) cce38eefd4
Some checks are pending
Tests / Ubuntu SSL tests with OpenSSL (push) Blocked by required conditions
Tests / WASI (push) Blocked by required conditions
Tests / Hypothesis tests on Ubuntu (push) Blocked by required conditions
Tests / (push) Blocked by required conditions
Tests / Windows MSI (push) Blocked by required conditions
Tests / Change detection (push) Waiting to run
Tests / Docs (push) Blocked by required conditions
Tests / Check if the ABI has changed (push) Blocked by required conditions
Tests / Check if Autoconf files are up to date (push) Blocked by required conditions
Tests / Check if generated files are up to date (push) Blocked by required conditions
Tests / Address sanitizer (push) Blocked by required conditions
Tests / Cross build Linux (push) Blocked by required conditions
Tests / CIFuzz (push) Blocked by required conditions
Tests / All required checks pass (push) Blocked by required conditions
Lint / lint (push) Waiting to run
[3.14] Doc/c-api/memory.rst: extend --without-pymalloc doc with ASan information (GH-136790) (GH-136798)
Extend the documentation for disabling pymalloc with the `--without-pymalloc` flag regarding why it is worth to use it when enabling AddressSanitizer for Python build (which is done, e.g., in CPython's CI builds).

I have tested the CPython latest main build with both ASan and pymalloc enabled and it seems to work just fine. I did run the `python -m test` suite which didn't uncover any ASan crashes (though, it detected some memory leaks, which I believe are irrelevant here).

I have discussed ASan and this flag with @encukou on the CPython Core sprint on EuroPython 2025. We initially thought that the `--without-pymalloc` flag is needed for ASan builds due to the fact pymalloc must hit the begining of page when determining if the memory to be freed comes from pymalloc or was allocated by the system malloc. In other words, we thought, that ASan would crash CPython during free of big objects (allocated by system malloc). It may be that this was the case in the past, but it is not the case anymore as the `address_in_range` function used by pymalloc is annotated to be skipped from the ASan instrumentation.


(cherry picked from commit d19bb44713)

Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
2025-07-20 10:55:06 +02:00
..
abstract.rst
allocation.rst [3.14] gh-134160: Use multi-phase init in documentation examples (GH-134296) (#134753) 2025-05-26 21:50:18 +00:00
apiabiversion.rst gh-128629: Add Py_PACK_VERSION and Py_PACK_FULL_VERSION (GH-128630) 2025-01-09 11:10:28 +01:00
arg.rst [3.14] gh-89488: Add warning about Py_BuildValue("p") needing exact int (GH-135610) (GH-135843) 2025-06-23 10:41:39 +00:00
bool.rst
buffer.rst gh-132246: Add PEP 688 to C Buffer Protocol docs (#132249) 2025-04-08 10:43:27 -07:00
bytearray.rst Python 3.14.0a5 2025-02-11 19:16:29 +02:00
bytes.rst gh-121645: Fix typo in PyBytes_Join() doc (#123783) 2024-09-06 16:08:17 +02:00
call.rst
capsule.rst [3.14] gh-76595: Add note on PyCapsule_Import behavior (GH-134022) (GH-136074) 2025-06-28 13:08:15 +00:00
cell.rst gh-121533: Improve PyCell_[Get,Set] docs: mention the exceptions (#121534) 2024-07-09 18:47:35 +03:00
code.rst [3.14] gh-135755: Document __future__.* and CO_* as proper Sphinx objects (GH-135980) (GH-136370) 2025-07-07 12:55:20 +02:00
codec.rst
complex.rst gh-128813: hide mixed-mode functions for complex arithmetic from C-API (#131703) 2025-04-22 14:18:18 +02:00
concrete.rst
contextvars.rst gh-124872: Replace enter/exit events with "switched" (#125532) 2024-10-16 13:53:21 +02:00
conversion.rst gh-120026: soft deprecate Py_HUGE_VAL macro (#120027) 2024-11-01 22:04:31 +00:00
coro.rst
datetime.rst gh-123517: Remove unnecessary `:meth:` parentheses (#123518) 2024-09-01 05:59:42 +01:00
descriptor.rst
dict.rst gh-127989: C API: Refer to "attached thread states" instead of the GIL (GH-127990) 2025-03-20 13:06:59 +01:00
exceptions.rst [3.14] gh-136209: Add .. c:var:: declarations for C exception types (GH-136210) (GH-136504) 2025-07-10 15:10:43 +02:00
extension-modules.rst [3.14] Docs: Remove unnecessary trailing backslashes (GH-135781) (GH-135791) 2025-06-21 13:07:51 +00:00
file.rst
float.rst [3.14] gh-136663: fix signatures of PyFloat_Pack/Unpack in docs (GH-136664) (#136666) 2025-07-15 05:36:47 +00:00
frame.rst gh-118915: C API: Document frame locals proxies. (#127720) 2024-12-11 17:28:44 +01:00
function.rst [3.14] gh-135755: Docs: C API: Document missing PyFunction_GET* macros (GH-135762) (GH-135916) 2025-06-25 10:50:56 +02:00
gcsupport.rst [3.14] gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962) (GH-134344) 2025-05-20 19:11:01 +02:00
gen.rst
hash.rst gh-122854: Add Py_HashBuffer() function (#122855) 2024-08-30 15:42:27 +00:00
import.rst gh-128911: Add PyImport_ImportModuleAttr() function (#128912) 2025-01-30 11:17:29 +00:00
index.rst [3.14] gh-134160: Split extension module init from PyModule docs; emphasize multi-phase init (GH-135126) (#135470) 2025-06-16 18:01:09 +03:00
init.rst [3.14] Docs: Fix duplicate word typos (GH-135958) (GH-136007) 2025-06-27 00:05:53 +00:00
init_config.rst Python 3.14.0b1 2025-05-06 18:33:52 +03:00
intro.rst [3.14] gh-134160: Split extension module init from PyModule docs; emphasize multi-phase init (GH-135126) (#135470) 2025-06-16 18:01:09 +03:00
iter.rst gh-105201: Add PyIter_NextItem() (#122331) 2024-08-08 00:47:15 +02:00
iterator.rst
lifecycle.dot [3.14] gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962) (GH-134344) 2025-05-20 19:11:01 +02:00
lifecycle.dot.css [3.14] gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962) (GH-134344) 2025-05-20 19:11:01 +02:00
lifecycle.dot.pdf [3.14] gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962) (GH-134344) 2025-05-20 19:11:01 +02:00
lifecycle.dot.svg [3.14] gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962) (GH-134344) 2025-05-20 19:11:01 +02:00
lifecycle.rst [3.14] Remove newline in Doc/c-api/lifecycle.rst for gettext builder (GH-135013) (GH-135038) 2025-06-02 18:19:54 +00:00
list.rst gh-121403: Add notes for PyList_GetXXX APIs about the need for init (gh-121626) 2024-07-16 10:16:41 +09:00
long.rst [3.14] Docs: Fix duplicate word typos (GH-135958) (GH-136007) 2025-06-27 00:05:53 +00:00
mapping.rst
marshal.rst gh-125063: marshal: Add version 5, improve documentation (GH-126829) 2024-11-15 13:48:57 +01:00
memory.rst [3.14] Doc/c-api/memory.rst: extend --without-pymalloc doc with ASan information (GH-136790) (GH-136798) 2025-07-20 10:55:06 +02:00
memoryview.rst
method.rst
module.rst [3.14] gh-134160: Split extension module init from PyModule docs; emphasize multi-phase init (GH-135126) (#135470) 2025-06-16 18:01:09 +03:00
monitoring.rst Python 3.14.0a7 2025-04-08 14:20:51 +03:00
none.rst
number.rst gh-121905: Consistently use "floating-point" instead of "floating point" (GH-121907) 2024-07-19 08:06:02 +00:00
object.rst [3.14] Docs: Fix and improve the PyUnstable_Object_EnableDeferredRefcount documentation (GH-135323) (GH-136610) 2025-07-13 06:52:58 +00:00
objimpl.rst [3.14] gh-75459: Doc: C API: Improve object life cycle documentation (GH-125962) (GH-134344) 2025-05-20 19:11:01 +02:00
perfmaps.rst gh-127989: C API: Refer to "attached thread states" instead of the GIL (GH-127990) 2025-03-20 13:06:59 +01:00
refcounting.rst [3.14] Docs: Fix markups for emphasis (GH-135598) (GH-135685) 2025-06-18 17:39:06 +00:00
reflection.rst gh-127989: C API: Refer to "attached thread states" instead of the GIL (GH-127990) 2025-03-20 13:06:59 +01:00
sequence.rst gh-127896: Add missing documentation of PySequence_In (GH-127979) 2024-12-16 14:56:04 +01:00
set.rst
slice.rst gh-130214: Document PyEllipsis_Type (GH-130215) 2025-02-17 13:56:33 +01:00
stable.rst [3.14] gh-134830: Fix reference in Doc/extending/windows.rst (GH-134831) (GH-135058) 2025-06-03 06:33:04 +00:00
structures.rst [3.14] gh-135913: Document ob_refcnt, ob_type, ob_size (GH-135914) (GH-136377) 2025-07-08 08:03:03 +02:00
sys.rst gh-127989: C API: Refer to "attached thread states" instead of the GIL (GH-127990) 2025-03-20 13:06:59 +01:00
time.rst gh-127989: C API: Refer to "attached thread states" instead of the GIL (GH-127990) 2025-03-20 13:06:59 +01:00
tuple.rst gh-124182: Explain naming rules for struct sequence types (#124335) 2024-10-07 19:52:34 +02:00
type.rst [3.14] Document that PyType_GetModuleByDef returns a borrowed reference (GH-135666) (GH-135701) 2025-06-19 09:17:53 +02:00
typehints.rst
typeobj.rst [3.14] gh-135913: Document ob_refcnt, ob_type, ob_size (GH-135914) (GH-136377) 2025-07-08 08:03:03 +02:00
unicode.rst Python 3.14.0b3 2025-06-17 18:40:54 +03:00
utilities.rst
veryhigh.rst [3.14] gh-135755: Document __future__.* and CO_* as proper Sphinx objects (GH-135980) (GH-136370) 2025-07-07 12:55:20 +02:00
weakref.rst gh-128008: Add PyWeakref_IsDead() (GH-128009) 2024-12-19 16:17:15 +01:00