Repository navigation
gh-162144: Skip @nomemtest tests when using a thread sanitizer (TSan) - #162154
Conversation
sobolevn
left a comment
There was a problem hiding this comment.
LGTM.
Am I correct that this should be fixed in _testcapi?
The root issue is that PyMem_SetAllocator() uses a lock to set an allocator, whereas allocator functions such as PyMem_RawMalloc() , PyMem_Malloc() and PyObject_Malloc() get the allocator without lock. Adding a lock would make Python memory allocators slower, whereas the issue only occurs when using tracemalloc.start() and _testcapi functions (to inject _testcapi only exposes functions which can be used to trigger the data race. |
|
Thanks @vstinner for the PR 🌮🎉.. I'm working now to backport this PR to: 3.14, 3.15. |
|
GH-162174 is a backport of this pull request to the 3.15 branch. |
|
GH-162175 is a backport of this pull request to the 3.14 branch. |
|
Merged. Thanks for the review @sobolevn. |
Uh oh!
There was an error while loading. Please reload this page.