Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[3.7] bpo-40412: Nullify inittab_copy during finalization (GH-19746) #19842

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

Closed

Conversation

miss-islington
Copy link
Contributor

@miss-islington miss-islington commented May 1, 2020

Otherwise we leave a dangling pointer to free'd memory. If we
then initialize a new interpreter in the same process and call
PyImport_ExtendInittab, we will (likely) crash when calling
PyMem_RawRealloc(inittab_copy, ...) since the pointer address
is bogus.

Automerge-Triggered-By: @brettcannon
(cherry picked from commit 64224a4)

Co-authored-by: Gregory Szorc [email protected]

https://bugs.python.org/issue40412

Otherwise we leave a dangling pointer to free'd memory. If we
then initialize a new interpreter in the same process and call
PyImport_ExtendInittab, we will (likely) crash when calling
PyMem_RawRealloc(inittab_copy, ...) since the pointer address
is bogus.

Automerge-Triggered-By: @brettcannon
(cherry picked from commit 64224a4)

Co-authored-by: Gregory Szorc <[email protected]>
@miss-islington
Copy link
Contributor Author

@indygreg: Status check is done, and it's a success ✅ .

1 similar comment
@miss-islington
Copy link
Contributor Author

@indygreg: Status check is done, and it's a success ✅ .

@brettcannon
Copy link
Member

Since @indygreg isn't sure if this is a problem this far back I am closing this PR.

@brettcannon brettcannon closed this May 1, 2020
@miss-islington miss-islington deleted the backport-64224a4-3.7 branch May 1, 2020 23:06
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.

5 participants