Race in _ctypes_alloc_callback and libffi under free-threading #128485
Labels
3.13
bugs and security fixes
3.14
new features, bugs and security fixes
extension-modules
C modules in the Modules dir
topic-ctypes
topic-free-threading
type-bug
An unexpected behavior, bug, or error
Bug report
Bug description:
I built libffi with TSAN and cpython (3.13 branch) with free-threading and TSAN. The following python code reports TSAN warnings:
TSAN report exract:
More details on the build and the output: https://gist.github.com/vfdev-5/06b1c60713241e75773e9a92f2ecf135
The issue is with dlmalloc of libffi (reported here)
Discussing the issue with @colesbury and @Yhg1s on discord, Thomas proposed the following fix (agreed by Sam):
CPython versions tested on:
3.13
Operating systems tested on:
Linux
The text was updated successfully, but these errors were encountered: