mirror of
https://github.com/python/cpython.git
synced 2025-08-04 08:59:19 +00:00
GH-123185: Check for NULL
after calling _PyEvalFramePushAndInit
(GH-123194)
This commit is contained in:
parent
90c892efea
commit
1eba8bae92
5 changed files with 29 additions and 4 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue