Skip to content

Conversation

@colesbury
Copy link
Contributor

@colesburycolesbury commented Feb 13, 2025

  • Use a mutex to avoid potentially returning a non-immortalized string, because immortalization happens after the insertion into the interned dict.

  • Use Py_DECREF() calls instead of Py_SET_REFCNT(s, Py_REFCNT(s) - 2) for thread-safety. This code path isn't performance sensitive, so just use Py_DECREF() unconditionally for simplicity.

…ded build * Use a mutex to avoid potentially returning a non-immortalized string, because immortalization happens after the insertion into the interned dict. * Use `Py_DECREF()` calls instead of `Py_SET_REFCNT(s, Py_REFCNT(s) - 2)` for thread-safety. This code path isn't performance sensistive, so just use `Py_DECREF()` unconditionally for simplicity.
@colesburycolesbury added skip news 🔨 test-with-refleak-buildbots Test PR w/ refleak buildbots; report in status section topic-free-threading labels Feb 13, 2025
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @colesbury for commit a12edba 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F30617%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-refleak-buildbots label again.

@colesburycolesbury marked this pull request as ready for review February 14, 2025 00:37
Copy link
Contributor

@mpagempage left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Member

@encukouencukou left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! I didn't check if this solves the issue, but it looks like an improvement.

@encukouencukou merged commit b9d2ee6 into python:mainFeb 17, 2025
47 checks passed
@colesburycolesbury deleted the gh-129701-intern-common branch February 18, 2025 16:00
Sign up for freeto 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.

4 participants

@colesbury@bedevere-bot@encukou@mpage