mirror of
https://github.com/python/cpython.git
synced 2026-05-07 02:51:00 +00:00
[3.13] Doc/c-api/memory.rst: extend --without-pymalloc doc with ASan information (GH-136790) (#136799)
Extends 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).
(cherry picked from commit d19bb44713)
Co-authored-by: Disconnect3d <dominik.b.czarnota@gmail.com>
Co-authored-by: Petr Viktorin <encukou@gmail.com>
This commit is contained in:
parent
f7be0ee9db
commit
c99fad72a1
2 changed files with 7 additions and 0 deletions
|
|
@ -656,6 +656,10 @@ This allocator is disabled if Python is configured with the
|
|||
:option:`--without-pymalloc` option. It can also be disabled at runtime using
|
||||
the :envvar:`PYTHONMALLOC` environment variable (ex: ``PYTHONMALLOC=malloc``).
|
||||
|
||||
Typically, it makes sense to disable the pymalloc allocator when building
|
||||
Python with AddressSanitizer (:option:`--with-address-sanitizer`) which helps
|
||||
uncover low level bugs within the C code.
|
||||
|
||||
Customize pymalloc Arena Allocator
|
||||
----------------------------------
|
||||
|
||||
|
|
|
|||
|
|
@ -771,6 +771,9 @@ Debug options
|
|||
.. option:: --with-address-sanitizer
|
||||
|
||||
Enable AddressSanitizer memory error detector, ``asan`` (default is no).
|
||||
To improve ASan detection capabilities you may also want to combine this
|
||||
with :option:`--without-pymalloc` to disable the specialized small-object
|
||||
allocator whose allocations are not tracked by ASan.
|
||||
|
||||
.. versionadded:: 3.6
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue