mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
bpo-45521: Fix a bug in the obmalloc radix tree code. (GH-29051)
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.
This commit is contained in:
parent
9942f42a93
commit
311910b31a
2 changed files with 4 additions and 1 deletions
|
@ -1341,7 +1341,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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue