FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-117657: Fixes a few small TSAN issues in dictobject by DinoV · Pull Request #118200 · python/cpython · GitHub

/ cpython Public

gh-117657: Fixes a few small TSAN issues in dictobject - #118200

Merged
DinoV merged 2 commits into
python:mainfrom
DinoV:nogil_dict_tsan
Apr 25, 2024
Merged

gh-117657: Fixes a few small TSAN issues in dictobject#118200
DinoV merged 2 commits into
python:mainfrom
DinoV:nogil_dict_tsan

Conversation

DinoV commented Apr 23, 2024
edited by bedevere-app Bot
Loading

Copy link
Copy Markdown
Contributor

There's a few spots in the dict implementation where we're not using atomics to access or update the dictionary size. This updates those so that we're using relaxed atomics on them.

The dictobject.h case is a little special because we don't have the FT macros available, so it's special cased with an ifdef.

DinoV marked this pull request as ready for review April 23, 2024 23:53

mpage commented Apr 24, 2024

Copy link
Copy Markdown
Contributor

LGTM!

    Keys need atomic relaxed loads as they can be assigned from another thread
    Entries need atomic release assigns so the values they point to are seen
    Reading managed dict needs acquire so that the memory of a newly created and published dictionary is visible
colesbury changed the title [gh-117657] Fixes a few small TSAN issues in dictobject gh-117657: Fixes a few small TSAN issues in dictobject Apr 25, 2024
DinoV merged commit 5da0280 into python:main Apr 25, 2024
DinoV deleted the nogil_dict_tsan branch May 31, 2024 18:22
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL