[3.9] gh-87759 bpo-37448: Use radix tree for pymalloc address_in_range(). (GH-14474) by diegorusso · Pull Request #113737 · python/cpython
This is a backport of the radix tree implementation for pymalloc. It is not platform specific but it solves a segmentation fault on aarch64 platforms when MTE (Memory Tag Extension) is enabled. The github issue is gh-87759.
Original commit message:
The radix tree approach is a relatively simple and memory sanitary alternative to the old (slightly) unsanitary address_in_range(). To disable the radix tree map, set a preprocessor flag as follows: -DWITH_PYMALLOC_RADIX_TREE=0.
(cherry picked from commit 85b6b70)