[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread miss-islington
miss-islington added the comment: New changeset beb834292db54fea129dd073cc822179430cee52 by Miss Islington (bot) in branch '3.10': bpo-27946: Fix possible crash in ElementTree.Element (GH-29915) https://github.com/python/cpython/commit/beb834292db54fea129dd073cc822179430cee52 -- __

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread miss-islington
miss-islington added the comment: New changeset 52a9a71fe682e47f6c78a9c34aa9a797ca632c86 by Miss Islington (bot) in branch '3.9': bpo-27946: Fix possible crash in ElementTree.Element (GH-29915) https://github.com/python/cpython/commit/52a9a71fe682e47f6c78a9c34aa9a797ca632c86 -- ___

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +28144 pull_request: https://github.com/python/cpython/pull/29920 ___ Python tracker ___ __

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: New changeset d15cdb2f32f572ce56d7120135da24b9fdce4c99 by Serhiy Storchaka in branch 'main': bpo-27946: Fix possible crash in ElementTree.Element (GH-29915) https://github.com/python/cpython/commit/d15cdb2f32f572ce56d7120135da24b9fdce4c99 --

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-05 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 5.0 -> 6.0 pull_requests: +28143 pull_request: https://github.com/python/cpython/pull/29919 ___ Python tracker _

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-04 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The issue is no longer reproduced by the original test because of the cache for dict key tables. But it is not gone, and can be reproduced with modified test. There may be many similar bugs in the Python core end extensions. Adding incref/decref in PyDict_

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-04 Thread Serhiy Storchaka
Change by Serhiy Storchaka : -- pull_requests: +28140 stage: -> patch review pull_request: https://github.com/python/cpython/pull/29915 ___ Python tracker ___

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-04 Thread Dong-hee Na
Change by Dong-hee Na : -- nosy: +corona10 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.pytho

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Concur with Irit. We should patch the caller of PyDict_GetItem, not PyDict_GetItem. -- nosy: +serhiy.storchaka ___ Python tracker ___

[issue27946] elementtree calls PyDict_GetItem without owning a reference to the dict

2021-12-02 Thread Irit Katriel
Irit Katriel added the comment: This is a bug in elementtree - the caller should own a reference to the dict during the entire PyDict_GetItem call. We won't add the refcount change you propose because it's not free and this is a hot function. The test in your patch doesn't fail for me (I t