Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

ctypes thread safety auditing (and fixing) #127945

Closed
@ZeroIntensity

Description

@ZeroIntensity

Feature or enhancement

This is a tracking issue for all thread safety problems related to ctypes. I'll be working on this, but others can feel free to give me some help.

First of all, we need to find where the thread safety problems are.

### Auditing- [x] Audit `_ctypes.c`- [ ] Audit `_ctypes_test.c` (and probably the generated file too)- [ ] Audit `callbacks.c`- [ ] Audit `callproc.c`- [ ] Audit `cfield.c`- [x] Audit `malloc_closure.c`- [ ] Audit `stgdict.c`

I'll be tracking the issues that get found when auditing here. The plan is to just create a new issue and link to it for each new problem instead of flooding this issue with PRs.

Generally, the workflow for fixes should follow most of the rules from#116738, but I suspect we'll need recursive mutexes for quite a few things related to callbacks, because it's difficult to tell what might be re-entrant, and we can't use critical sections for arbitrary function pointers.

### Known Issues- [ ] https://github.com/python/cpython/issues/127946- [ ] https://github.com/python/cpython/issues/128182- [ ] https://github.com/python/cpython/issues/128485- [ ] https://github.com/python/cpython/issues/128567- [ ] https://github.com/python/cpython/issues/128570- [ ] https://github.com/python/cpython/issues/131974

cc@encukou, as the ctypes genius, and@colesbury as the free-threading mastermind.

Linked PRs

Metadata

Metadata

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions


    [8]ページ先頭

    ©2009-2025 Movatter.jp