-
-
Notifications
You must be signed in to change notification settings - Fork 11.2k
Closed
Labels
00 - Bug39 - free-threadingPRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)PRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)component: numpy.f2py
Milestone
Description
@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:
Line 601 in b37f761
static struct { int nd;npy_intp *d;int *i,*i_tr,tr; } forcombcache; |
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.
Metadata
Metadata
Assignees
Labels
00 - Bug39 - free-threadingPRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)PRs and issues related to support for free-threading CPython (a.k.a. no-GIL, PEP 703)component: numpy.f2py