FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

gh-101046: Fix a potential memory leak in the parser when raising MemoryError by pablogsal · Pull Request #101051 · python/cpython · GitHub

/ cpython Public

gh-101046: Fix a potential memory leak in the parser when raising MemoryError - #101051

Merged
pablogsal merged 2 commits into
python:mainfrom
pablogsal:gh-101046
Jan 16, 2023
Merged

gh-101046: Fix a potential memory leak in the parser when raising MemoryError#101051
pablogsal merged 2 commits into
python:mainfrom
pablogsal:gh-101046

Conversation

pablogsal commented Jan 15, 2023
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Member

"void **_new_children = PyMem_Realloc(_children, _children_capacity*sizeof(void *));"
)
self.out_of_memory_return(f"!_new_children")
self.out_of_memory_return(f"!new_children", cleanup_code="PyMem_Free(_children);")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality
Suggested change
self.out_of_memory_return(f"!new_children", cleanup_code="PyMem_Free(_children);")
self.out_of_memory_return(f"!_new_children", cleanup_code="PyMem_Free(_children);")

lysnikolaou left a comment

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

LGTM!

pablogsal merged commit 1de4395 into python:main Jan 16, 2023
pablogsal deleted the gh-101046 branch January 16, 2023 18:45

Copy link
Copy Markdown
Contributor

Thanks @pablogsal for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10, 3.11.
🐍🍒⛏🤖

Copy link
Copy Markdown
Contributor

Sorry, @pablogsal, I could not cleanly backport this to 3.11 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 1de4395f62bb140563761ef5cbdf46accef3c550 3.11

Copy link
Copy Markdown
Contributor

Sorry @pablogsal, I had trouble checking out the 3.10 backport branch.
Please retry by removing and re-adding the "needs backport to 3.10" label.
Alternatively, you can backport using cherry_picker on the command line.
cherry_picker 1de4395f62bb140563761ef5cbdf46accef3c550 3.10

Copy link
Copy Markdown
Contributor

Sorry, @pablogsal, I could not cleanly backport this to 3.9 due to a conflict.
Please backport using cherry_picker on command line.
cherry_picker 1de4395f62bb140563761ef5cbdf46accef3c550 3.9

pablogsal added a commit to pablogsal/cpython that referenced this pull request Jan 16, 2023
…n raising MemoryError (pythonGH-101051).

(cherry picked from commit 1de4395)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

Copy link
Copy Markdown

GH-101085 is a backport of this pull request to the 3.11 branch.

bedevere-bot removed the needs backport to 3.11 only security fixes label Jan 16, 2023
pablogsal added a commit to pablogsal/cpython that referenced this pull request Jan 16, 2023
…n raising MemoryError (pythonGH-101051).

(cherry picked from commit 1de4395)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

Copy link
Copy Markdown

GH-101086 is a backport of this pull request to the 3.10 branch.

bedevere-bot removed the needs backport to 3.10 only security fixes label Jan 16, 2023
pablogsal added a commit that referenced this pull request Jan 16, 2023
…ing MemoryError (GH-101051). (#101086)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>
pablogsal added a commit that referenced this pull request Jan 16, 2023
…ing MemoryError (GH-101051) (#101085)

Co-authored-by: Pablo Galindo Salgado <Pablogsal@gmail.com>

hugovk commented Feb 18, 2025

Copy link
Copy Markdown
Member

Sorry, @pablogsal, I could not cleanly backport this to 3.9 due to a conflict. Please backport using cherry_picker on command line. cherry_picker 1de4395f62bb140563761ef5cbdf46accef3c550 3.9

@pablogsal Does this still need backporting to 3.9? Otherwise let's remove the backport label.

Copy link
Copy Markdown
Member Author

Removed

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

6 participants


Back | FazBrowse Home | New Git URL