Skip to content

[mypyc] Fix dict iteration memory safety on free-threaded builds#21617

Merged
JukkaL merged 1 commit into
masterfrom
mypyc-free-threading-dict-2
Jun 15, 2026
Merged

[mypyc] Fix dict iteration memory safety on free-threaded builds#21617
JukkaL merged 1 commit into
masterfrom
mypyc-free-threading-dict-2

Conversation

@JukkaL

@JukkaL JukkaL commented Jun 15, 2026

Copy link
Copy Markdown
Collaborator

PyDict_Next() returns a borrowed reference, so we need to add critical sections around the calls to ensure memory safety.

I used coding agent assist.

`PyDict_Next()` returns a borrowed reference, so we need to add
critical sections around the calls to ensure memory safety.
@JukkaL JukkaL merged commit 27d7a35 into master Jun 15, 2026
18 checks passed
@JukkaL JukkaL deleted the mypyc-free-threading-dict-2 branch June 15, 2026 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants