gh-134144: Fix use-after-free in zapthreads() (#134145)

This commit is contained in:
b-pass 2025-05-18 11:02:29 -04:00 committed by GitHub
parent 0a160bf14c
commit f2de1e6861
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 41 additions and 6 deletions

View file

@ -1452,6 +1452,14 @@ class LowLevelTests(TestBase):
self.assertFalse(
self.interp_exists(interpid))
with self.subTest('basic C-API'):
interpid = _testinternalcapi.create_interpreter()
self.assertTrue(
self.interp_exists(interpid))
_testinternalcapi.destroy_interpreter(interpid, basic=True)
self.assertFalse(
self.interp_exists(interpid))
def test_get_config(self):
# This test overlaps with
# test.test_capi.test_misc.InterpreterConfigTests.