This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Memory leak in the compiler in case of errors
Type: resource usage Stage: resolved
Components: Interpreter Core Versions: Python 3.8, Python 3.7, Python 3.6, Python 2.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: serhiy.storchaka Nosy List: miss-islington, serhiy.storchaka, vstinner
Priority: normal Keywords: patch

Created on 2018-07-10 08:20 by serhiy.storchaka, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 8222 merged serhiy.storchaka, 2018-07-10 08:26
PR 8242 closed vstinner, 2018-07-11 09:24
PR 8256 merged miss-islington, 2018-07-11 21:18
PR 8257 merged miss-islington, 2018-07-11 21:19
PR 8258 merged miss-islington, 2018-07-11 21:20
Messages (7)
msg321367 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2018-07-10 08:20
Merging PR 6517 for issue33305 exposed a leak in the compiler:

https://buildbot.python.org/all/#/builders/1/builds/280

$ ./python -m test -R 3:3 test_compile test_grammar
Run tests sequentially
0:00:00 load avg: 1.95 [1/2] test_compile
beginning 6 repetitions
123456
......
test_compile leaked [15, 16, 15] memory blocks, sum=46
0:00:14 load avg: 1.97 [2/2/1] test_grammar -- test_compile failed
beginning 6 repetitions
123456
......
test_grammar leaked [50, 50, 50] memory blocks, sum=150
test_grammar failed

== Tests result: FAILURE ==

2 tests failed:
    test_compile test_grammar

Total duration: 15 sec 226 ms
Tests result: FAILURE


This branch was not common, but after issue33305 it has became more common and heavily tested.
msg321419 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-11 09:25
Related issue: bpo-34084.
msg321500 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-11 21:18
New changeset 993030aac576710a46b3dd0b4864f819d4a94145 by Victor Stinner (Serhiy Storchaka) in branch 'master':
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
https://github.com/python/cpython/commit/993030aac576710a46b3dd0b4864f819d4a94145
msg321504 - (view) Author: miss-islington (miss-islington) Date: 2018-07-11 21:53
New changeset a45fa39d85fc500d530d05d3ec7b36eb5d286f5e by Miss Islington (bot) in branch '2.7':
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
https://github.com/python/cpython/commit/a45fa39d85fc500d530d05d3ec7b36eb5d286f5e
msg321506 - (view) Author: miss-islington (miss-islington) Date: 2018-07-11 21:54
New changeset 9beed0c36f4ce990ded095575ba3124e2264dbbe by Miss Islington (bot) in branch '3.7':
bpo-34080: Fix a memory leak in the compiler. (GH-8222)
https://github.com/python/cpython/commit/9beed0c36f4ce990ded095575ba3124e2264dbbe
msg321507 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-11 22:05
New changeset 3b06285d2b7963d9d06b60e85712d5ecc6540deb by Victor Stinner (Miss Islington (bot)) in branch '3.6':
bpo-34080: Fix a memory leak in the compiler. (GH-8222) (GH-8257)
https://github.com/python/cpython/commit/3b06285d2b7963d9d06b60e85712d5ecc6540deb
msg321508 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2018-07-11 22:06
Thanks Serhiy for the fix! It seems that new tests helped to find a real bug ;-)
History
Date User Action Args
2022-04-11 14:59:02adminsetgithub: 78261
2018-07-11 22:06:11vstinnersetstatus: open -> closed
resolution: fixed
messages: + msg321508

stage: patch review -> resolved
2018-07-11 22:05:32vstinnersetmessages: + msg321507
2018-07-11 21:54:31miss-islingtonsetmessages: + msg321506
2018-07-11 21:53:20miss-islingtonsetnosy: + miss-islington
messages: + msg321504
2018-07-11 21:20:07miss-islingtonsetpull_requests: + pull_request7791
2018-07-11 21:19:05miss-islingtonsetpull_requests: + pull_request7790
2018-07-11 21:18:26miss-islingtonsetpull_requests: + pull_request7789
2018-07-11 21:18:03vstinnersetmessages: + msg321500
2018-07-11 09:25:11vstinnersetmessages: + msg321419
2018-07-11 09:24:29vstinnersetpull_requests: + pull_request7774
2018-07-10 08:27:06serhiy.storchakasetnosy: + vstinner
2018-07-10 08:26:31serhiy.storchakasetkeywords: + patch
stage: patch review
pull_requests: + pull_request7760
2018-07-10 08:20:42serhiy.storchakacreate