mirror of
https://github.com/python/cpython.git
synced 2025-12-10 11:00:14 +00:00
GH-93252: Fix error handling for failed Python calls (GH-94693)
This commit is contained in:
parent
4bed0db7c2
commit
8a285df806
3 changed files with 19 additions and 1 deletions
|
|
@ -26,6 +26,18 @@ class FunctionCalls(unittest.TestCase):
|
|||
self.assertIsInstance(res, dict)
|
||||
self.assertEqual(list(res.items()), expected)
|
||||
|
||||
def test_frames_are_popped_after_failed_calls(self):
|
||||
# GH-93252: stuff blows up if we don't pop the new frame after
|
||||
# recovering from failed calls:
|
||||
def f():
|
||||
pass
|
||||
for _ in range(1000):
|
||||
try:
|
||||
f(None)
|
||||
except TypeError:
|
||||
pass
|
||||
# BOOM!
|
||||
|
||||
|
||||
@cpython_only
|
||||
class CFunctionCallsErrorMessages(unittest.TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue