Skip to content

gh-150157: fix: critical section for PyDict_Next in _pickle.c#150158

Open
KowalskiThomas wants to merge 3 commits into
python:mainfrom
KowalskiThomas:kowalski/fix-pickle-whichmodule-has-a-uaf-on-free-threading
Open

gh-150157: fix: critical section for PyDict_Next in _pickle.c#150158
KowalskiThomas wants to merge 3 commits into
python:mainfrom
KowalskiThomas:kowalski/fix-pickle-whichmodule-has-a-uaf-on-free-threading

Conversation

@KowalskiThomas
Copy link
Copy Markdown
Contributor

@KowalskiThomas KowalskiThomas commented May 20, 2026

@KowalskiThomas KowalskiThomas changed the title fix: critical section for PyDict_Next in _pickle.c gh-150157: fix: critical section for PyDict_Next in _pickle.c May 20, 2026
Comment thread Modules/_pickle.c
Py_DECREF(modules);
return found_name;
}
if (error) {
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

nitpick: i would prefer checking for errors before checking if (found_name != NULL).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Thanks for taking a look! Updated it.

@KowalskiThomas KowalskiThomas marked this pull request as ready for review May 21, 2026 18:50
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.

Missing critical section for PyDict_Next in _pickle.c

2 participants