mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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 311910b31a
)
This commit is contained in:
parent
00ddc1fbd7
commit
1cdac61065
2 changed files with 4 additions and 1 deletions
|
@ -0,0 +1,3 @@
|
|||
Fix a bug in the obmalloc radix tree code. On 64-bit machines, the bug
|
||||
causes the tree to hold 46-bits of virtual addresses, rather than the
|
||||
intended 48-bits.
|
|
@ -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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue