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.
Created on 2021年02月10日 09:44 by CharlesFengY, last changed 2022年04月11日 14:59 by admin.
| Messages (4) | |||
|---|---|---|---|
| msg386766 - (view) | Author: Yang Feng (CharlesFengY) | Date: 2021年02月10日 09:44 | |
In the following programs, we call check_reentrant_insertion("s") twice, after multiple of update and clear of dict, the Python interpreter crashes.
+++++++++++++++++++++++++++++++++++++++++++
def check_reentrant_insertion(mutate):
class Mutating:
def __del__(self):
mutate(d)
d = {k: Mutating() for k in 'abcdefghijklmnopqr'}
for k in list(d):
d[k] = k
def test_reentrant_insertion():
check_reentrant_insertion("s")
def mutate(d):
d.update(DictTest.__dict__)
d.clear()
check_reentrant_insertion(test_reentrant_insertion())
test_reentrant_insertion()
+++++++++++++++++++++++++++++++++++++++++
System Info: Ubuntu 16.04
Python Version: Python 3.9.1
|
|||
| msg386811 - (view) | Author: Raymond Hettinger (rhettinger) * (Python committer) | Date: 2021年02月10日 21:44 | |
I can confirm this crashes. |
|||
| msg386812 - (view) | Author: Inada Naoki (methane) * (Python committer) | Date: 2021年02月10日 21:51 | |
Is this the crash you are reporting? ``` Exception ignored in: <function check_reentrant_insertion.<locals>.Mutating.__del__ at 0x100d35af0> Traceback (most recent call last): File "/Users/methane/work/python/cpython/PC/xxx.py", line 5, in __del__ mutate(d) TypeError: 'str' object is not callable Exception ignored in: <function check_reentrant_insertion.<locals>.Mutating.__del__ at 0x100d35c10> Traceback (most recent call last): File "/Users/methane/work/python/cpython/PC/xxx.py", line 5, in __del__ Fatal Python error: _Py_CheckRecursiveCall: Cannot recover from stack overflow. Python runtime state: initialized Current thread 0x000000010072bd40 (most recent call first): File "/Users/methane/work/python/cpython/xxx.py", line 9 in check_reentrant_insertion File "/Users/methane/work/python/cpython/xxx.py", line 13 in test_reentrant_insertion File "/Users/methane/work/python/cpython/xxx.py", line 18 in test_reentrant_insertion ... ``` |
|||
| msg386907 - (view) | Author: Terry J. Reedy (terry.reedy) * (Python committer) | Date: 2021年02月13日 05:07 | |
Like the code in #43185, #43186, #43187, this works better in 3.10.0a5, so I suspect it is another duplicate. |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022年04月11日 14:59:41 | admin | set | github: 87354 |
| 2021年02月13日 05:07:49 | terry.reedy | set | nosy:
+ terry.reedy messages: + msg386907 |
| 2021年02月10日 21:51:08 | methane | set | messages: + msg386812 |
| 2021年02月10日 21:44:32 | rhettinger | set | nosy:
+ rhettinger, methane messages: + msg386811 |
| 2021年02月10日 09:44:21 | CharlesFengY | create | |