Skip to content

BUG: thread safety issue in f2py implementation #29086

@ngoldbaum

Description

@ngoldbaum

@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:

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

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions