diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2021-10-21 15:39:58 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-21 15:39:58 (GMT) |
commit | 1cdac61065e72db60d26e03ef9286d2743d7000e (patch) | |
tree | b118974db71db92f73df741a6373c5682baa8e6a /Objects | |
parent | 00ddc1fbd7296ffe066077194a895b175cca26de (diff) | |
download | cpython-1cdac61065e72db60d26e03ef9286d2743d7000e.zip cpython-1cdac61065e72db60d26e03ef9286d2743d7000e.tar.gz cpython-1cdac61065e72db60d26e03ef9286d2743d7000e.tar.bz2 |
bpo-45521: Fix a bug in the obmalloc radix tree code. (GH-29051) (GH-29122)
MAP_BOT_LENGTH was incorrectly used to compute MAP_TOP_MASK instead of
MAP_TOP_LENGTH. On 64-bit machines, the error causes the tree to hold
46-bits of virtual addresses, rather than the intended 48-bits.
(cherry picked from commit 311910b31a4bd94dc79298388b7cb65ca5546438)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/obmalloc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/obmalloc.c b/Objects/obmalloc.c index 15c442b..615703a 100644 --- a/Objects/obmalloc.c +++ b/Objects/obmalloc.c @@ -1328,7 +1328,7 @@ _Py_GetAllocatedBlocks(void) #define MAP_TOP_BITS INTERIOR_BITS #define MAP_TOP_LENGTH (1 << MAP_TOP_BITS) -#define MAP_TOP_MASK (MAP_BOT_LENGTH - 1) +#define MAP_TOP_MASK (MAP_TOP_LENGTH - 1) #define MAP_MID_BITS INTERIOR_BITS #define MAP_MID_LENGTH (1 << MAP_MID_BITS) |