Skip to content
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

[3.8] bpo-40412: Nullify inittab_copy during finalization (GH-19746) #19841

Merged
merged 1 commit into from May 1, 2020

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 gregory.szorc@gmail.com

https://bugs.python.org/issue40412

Automerge-Triggered-By: @brettcannon

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 <gregory.szorc@gmail.com>
@miss-islington
Copy link
Contributor Author

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

2 similar comments
@miss-islington
Copy link
Contributor Author

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

@miss-islington
Copy link
Contributor Author

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

@miss-islington miss-islington merged commit 1205afb into python:3.8 May 1, 2020
@miss-islington miss-islington deleted the backport-64224a4-3.8 branch May 1, 2020 23:06
@miss-islington
Copy link
Contributor Author

Sorry, I can't merge this PR. Reason: Pull Request is not mergeable.

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.

None yet

5 participants