BUG: thread safety issue in f2py implementation #29086
Labels
00 - Bug
39 - free-threading
PRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)
component: numpy.f2py
Milestone
@crusaderky tracked down a thread safety issue over in SciPy to code generated by f2py. See scipy/scipy#21936 (comment).
Lo and behold, there's a static struct I missed when I went over the f2py codebase last year:
numpy/numpy/f2py/cfuncs.py
Line 601 in b37f761
I think the simplest fix is probably to make the struct thread-local. @crusaderky told me they were working on an isolated test case to trigger the issue they hit and a patch.
The text was updated successfully, but these errors were encountered: