
This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.
Created on2015-12-23 23:39 bycharettes, last changed2022-04-11 14:58 byadmin. This issue is nowclosed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| test.py | charettes,2015-12-23 23:39 | Reproduction test case | ||
| odict_traverse.patch | serhiy.storchaka,2015-12-28 21:49 | review | ||
| Messages (4) | |||
|---|---|---|---|
| msg256945 -(view) | Author: Simon Charette (charettes)* | Date: 2015-12-23 23:39 | |
I attached a file with a reproduction test case that passes on Python 2.7 and 3.4 but fails on 3.5.0 and 3.5.1This might be solved by the improvement planed in#25410. | |||
| msg257130 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2015-12-28 21:49 | |
An OrderedDict owns two references to every key (as a dict and from a linked list). Therefore it should visit it twice in tp_traverse.Proposed patch fixes garbage collection for OrderedDict. It also rewrites OrderedDict clearing in more reentrant form (a linked list is detached from an OrderedDict before deallocating its nodes that can trigger executing user code). | |||
| msg258590 -(view) | Author: Roundup Robot (python-dev)![]() | Date: 2016-01-19 12:49 | |
New changeset627575e9a7aa by Serhiy Storchaka in branch '3.5':Issue#25935: Garbage collector now breaks reference loops with OrderedDict.https://hg.python.org/cpython/rev/627575e9a7aaNew changeset5f0a08cfc4f6 by Serhiy Storchaka in branch 'default':Issue#25935: Garbage collector now breaks reference loops with OrderedDict.https://hg.python.org/cpython/rev/5f0a08cfc4f6 | |||
| msg258592 -(view) | Author: Serhiy Storchaka (serhiy.storchaka)*![]() | Date: 2016-01-19 13:50 | |
In some cases (as in committed test) garbage collector was not able to collect a loop with OrderedDict at all. | |||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:58:25 | admin | set | github: 70123 |
| 2016-01-19 13:50:20 | serhiy.storchaka | set | status: open -> closed messages: +msg258592 assignee:serhiy.storchaka resolution: fixed stage: patch review -> resolved |
| 2016-01-19 12:49:09 | python-dev | set | nosy: +python-dev messages: +msg258590 |
| 2015-12-28 21:49:14 | serhiy.storchaka | set | files: +odict_traverse.patch versions: + Python 3.6 messages: +msg257130 keywords: +patch stage: patch review |
| 2015-12-28 13:02:36 | berker.peksag | set | nosy: +eric.snow,serhiy.storchaka |
| 2015-12-28 12:59:41 | Tim.Graham | set | nosy: +Tim.Graham |
| 2015-12-23 23:39:59 | charettes | create | |