[issue43593] pymalloc is not aware of Memory Tagging Extension (MTE) and crashes
Tim Peters
report at bugs.python.org
Wed Mar 31 15:11:29 EDT 2021
Tim Peters <tim at python.org> added the comment:
I'm skeptical ;-) If MTE is actually being used, system software assigns "random" values to 4 of the higher-order bits. When obmalloc punts to the system malloc, presumably those bits will be randomized in the addresses returned by malloc. Then it's just not possible that obmalloc's
assert(HIGH_BITS(p) == HIGH_BITS(&arena_map_root));
can always succeed - we're insisting there that _all_ the high-order bits are exactly the same as in the `&arena_map_root` file static. If `p` was actually obtained from the system `malloc()`, it should fail about 15 times out of 16 (and regardless of which of the 16 bit patterns the platform C assigns to &arena_map_root).
But, of course, that failure would only be seen in a debug build.
----------
nosy: +tim.peters
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43593>
_______________________________________
More information about the Python-bugs-list
mailing list