Skip to content

bpo-42246: Fix memory leak in compiler - #23256

Merged
markshannon merged 2 commits into
python:masterfrom
markshannon:fix-memory-leak-in-compiler
Nov 13, 2020
Merged

markshannon merged 2 commits into
python:masterfrom
markshannon:fix-memory-leak-in-compiler

Conversation

@markshannon

@markshannon markshannon commented Nov 13, 2020 •

Copy link
Copy Markdown
Member

The actual memory leak fix is the change on line 2279.

It looks like assemble_init could potentially leak as well, so I've fixed that as well.

https://bugs.python.org/issue42246

@vstinner

Copy link
Copy Markdown
Member

I didn't look at the diff, but I confirm that this PR fix the issue that I reported:

$ ./python -m test -R 3:3 -j0 test_asyncgen test_builtin test_coroutines test_exceptions test_syntax
...
Tests result: SUCCESS
@markshannon markshannon added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 13, 2020
@bedevere-bot

Copy link
Copy Markdown

🤖 New build scheduled with the buildbot fleet by @markshannon for commit 55d9d2b 🤖

If you want to schedule another build, you need to add the ":hammer: test-with-buildbots" label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Nov 13, 2020
@markshannon
markshannon merged commit fd009e6 into python:master Nov 13, 2020
adorilson pushed a commit to adorilson/cpython that referenced this pull request Mar 13, 2021
* Fix potential memory leak in assembler init.

* Fix reference leak when encountering error during compilation of function body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

4 participants