Commit 9bc1964
authored
pythongh-128679: Skip test_tracemalloc_track_race() on debug build (python#128988)
There is a race condition between PyMem_SetAllocator() and
PyMem_RawMalloc()/PyMem_RawFree(). While PyMem_SetAllocator() write
is protected by a lock, PyMem_RawMalloc()/PyMem_RawFree() reads are
not protected by a lock. PyMem_RawMalloc()/PyMem_RawFree() can be
called with an old context and the new function pointer.
On a release build, it's not an issue since the context is not used.
On a debug build, the debug hooks use the context and so can crash.1 parent 81159fc commit 9bc1964
1 file changed
+2
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1103 | 1103 | | |
1104 | 1104 | | |
1105 | 1105 | | |
| 1106 | + | |
| 1107 | + | |
1106 | 1108 | | |
1107 | 1109 | | |
1108 | 1110 | | |
| |||
0 commit comments