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

Missing critical sections forPyDict_Next calls in_functoolsmodule.c #145446

Open
Labels
@bkap123

Description

@bkap123

Bug report

Bug description:

After some discussion on PR#145362, I noticed that inModules/_functoolsmodule.c, all use cases ofPyDict_Next do not use a critical section, which is necessary in for the free-threaded build. Thedocs say that forPyDict_Next:

The function is not thread-safe in thefree-threaded build without external synchronization. You can usePy_BEGIN_CRITICAL_SECTION to lock the dictionary while iterating over it

I have not checked if other files are missing a critical section, but it is definitely possible. I will draft a PR shortly for this issue in the coming days, but if anyone else finds other occurrences ofPyDict_Next that are not thread-safe, please let me know.

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2026 Movatter.jp