mirror of
https://github.com/python/cpython.git
synced 2025-07-24 11:44:31 +00:00
bpo-36389: Change PyMem_SetupDebugHooks() constants (GH-12782)
Modify CLEANBYTE, DEADDYTE and FORBIDDENBYTE constants: use 0xCD, 0xDD and 0xFD, rather than 0xCB, 0xBB and 0xFB, to use the same byte patterns than Windows CRT debug malloc() and free().
This commit is contained in:
parent
536a35b3f1
commit
4c409beb4c
6 changed files with 37 additions and 24 deletions
|
@ -480,11 +480,11 @@ class PyMemDebugTests(unittest.TestCase):
|
|||
r" The [0-9] pad bytes at p-[0-9] are FORBIDDENBYTE, as expected.\n"
|
||||
r" The [0-9] pad bytes at tail={ptr} are not all FORBIDDENBYTE \(0x[0-9a-f]{{2}}\):\n"
|
||||
r" at tail\+0: 0x78 \*\*\* OUCH\n"
|
||||
r" at tail\+1: 0xfb\n"
|
||||
r" at tail\+2: 0xfb\n"
|
||||
r" at tail\+1: 0xfd\n"
|
||||
r" at tail\+2: 0xfd\n"
|
||||
r" .*\n"
|
||||
r" The block was made by call #[0-9]+ to debug malloc/realloc.\n"
|
||||
r" Data at p: cb cb cb .*\n"
|
||||
r" Data at p: cd cd cd .*\n"
|
||||
r"\n"
|
||||
r"Enable tracemalloc to get the memory block allocation traceback\n"
|
||||
r"\n"
|
||||
|
@ -500,7 +500,7 @@ class PyMemDebugTests(unittest.TestCase):
|
|||
r" The [0-9] pad bytes at p-[0-9] are FORBIDDENBYTE, as expected.\n"
|
||||
r" The [0-9] pad bytes at tail={ptr} are FORBIDDENBYTE, as expected.\n"
|
||||
r" The block was made by call #[0-9]+ to debug malloc/realloc.\n"
|
||||
r" Data at p: cb cb cb .*\n"
|
||||
r" Data at p: cd cd cd .*\n"
|
||||
r"\n"
|
||||
r"Enable tracemalloc to get the memory block allocation traceback\n"
|
||||
r"\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue