Skip to content

Commit 505ee34

Browse files
authored
Merge branch 'main' into fix-doc-issue-136752
2 parents 84c6210 + d19bb44 commit 505ee34

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed

Doc/c-api/memory.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -672,6 +672,10 @@ This allocator is disabled if Python is configured with the
672672
:option:`--without-pymalloc` option. It can also be disabled at runtime using
673673
the :envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``).
674674
675+
Typically, it makes sense to disable the pymalloc allocator when building
676+
Python with AddressSanitizer (:option:`--with-address-sanitizer`) which helps
677+
uncover low level bugs within the C code.
678+
675679
Customize pymalloc Arena Allocator
676680
----------------------------------
677681

Doc/using/configure.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -802,6 +802,9 @@ Debug options
802802
.. option:: --with-address-sanitizer
803803

804804
Enable AddressSanitizer memory error detector, ``asan`` (default is no).
805+
To improve ASan detection capabilities you may also want to combine this
806+
with :option:`--without-pymalloc` to disable the specialized small-object
807+
allocator whose allocations are not tracked by ASan.
805808

806809
.. versionadded:: 3.6
807810

0 commit comments

Comments
 (0)