mirror of
https://github.com/python/cpython.git
synced 2025-11-01 06:01:29 +00:00
gh-139748: fix leaks in AC error paths when using unicode FS-based converters (#139765)
This commit is contained in:
parent
570d17259f
commit
b04a57deef
14 changed files with 88 additions and 46 deletions
|
|
@ -579,6 +579,13 @@ def test_nested_genexpr(self):
|
|||
self.assertEqual(sorted(st.get_identifiers()), [".0", "y"])
|
||||
self.assertEqual(st.get_children(), [])
|
||||
|
||||
def test__symtable_refleak(self):
|
||||
# Regression test for reference leak in PyUnicode_FSDecoder.
|
||||
# See https://github.com/python/cpython/issues/139748.
|
||||
mortal_str = 'this is a mortal string'
|
||||
# check error path when 'compile_type' AC conversion failed
|
||||
self.assertRaises(TypeError, symtable.symtable, '', mortal_str, 1)
|
||||
|
||||
|
||||
class ComprehensionTests(unittest.TestCase):
|
||||
def get_identifiers_recursive(self, st, res):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue