Skip to content

[3.13] gh-123083: Fix a potential use-after-free in ``STORE_ATTR_WITH… #123235

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 22, 2024

Conversation

corona10
Copy link
Member

@corona10 corona10 commented Aug 22, 2024

…_HINT`` (gh-123092)

(cherry picked from commit 297f2e0)

…R_WITH_HINT`` (pythongh-123092)

(cherry picked from commit 297f2e0)

Co-authored-by: Donghee Na <donghee.na@python.org>
/* Ensure dict is GC tracked if it needs to be */
if (!_PyObject_GC_IS_TRACKED(dict) && _PyObject_GC_MAY_BE_TRACKED(value)) {
_PyObject_GC_TRACK(dict);
}
/* PEP 509 */
dict->ma_version_tag = new_version;
dict->ma_version_tag = new_version; // PEP 509
Copy link
Member Author

Choose a reason for hiding this comment

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

@colesbury
Since the structure is a little different from the main branch, I just reordered several codes to match as similar as possible.

@corona10 corona10 merged commit 6cd67e4 into python:3.13 Aug 22, 2024
57 of 59 checks passed
@corona10 corona10 deleted the backport-297f2e0-3.13 branch August 22, 2024 16:37
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