GH-123185: Check for NULL after calling _PyEvalFramePushAndInit (GH-123194)

This commit is contained in:
Mark Shannon 2024-08-21 12:44:56 +01:00 committed by GitHub
parent 90c892efea
commit 1eba8bae92
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 29 additions and 4 deletions

View file

@ -787,6 +787,19 @@ class ClassTests(unittest.TestCase):
Type(i)
self.assertEqual(calls, 100)
def test_specialization_class_call_doesnt_crash(self):
# gh-123185
class Foo:
def __init__(self, arg):
pass
for _ in range(8):
try:
Foo()
except:
pass
from _testinternalcapi import has_inline_values