[issue45210] tp_dealloc docs should mention error indicator may be set
STINNER Victor
report at bugs.python.org
Wed Apr 6 05:40:23 EDT 2022
STINNER Victor <vstinner at python.org> added the comment:
I wrote GH-32357 to check in debug mode that tp_dealloc functions leave the current exception unchanged. You can use attached unicode_dealloc_bug.patch to inject a bug to test my PR. Example ("make" is enough to trigger the bug):
---
Fatal Python error: _Py_Dealloc: Deallocator of type 'str' cleared the current exception
Python runtime state: initialized
Current thread 0x00007ff28d45a740 (most recent call first):
File "/home/vstinner/python/main/Lib/sysconfig.py", line 349 in _parse_makefile
File "/home/vstinner/python/main/Lib/sysconfig.py", line 470 in _generate_posix_vars
File "/home/vstinner/python/main/Lib/sysconfig.py", line 845 in _main
File "/home/vstinner/python/main/Lib/sysconfig.py", line 857 in <module>
File "<frozen runpy>", line 88 in _run_code
File "<frozen runpy>", line 198 in _run_module_as_main
generate-posix-vars failed
---
----------
Added file: https://bugs.python.org/file50724/unicode_dealloc_bug.patch
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue45210>
_______________________________________
More information about the Python-bugs-list
mailing list