Skip to content

Commit eee2195

Browse files
committed
Make sure exc_obj is always defined
Otherwise, it ends up being loaded using `LOAD_FAST_CHECK`, which increfs and causes the refcount check to fail when it uses `LOAD_FAST_BORROW`.
1 parent fd1ad3d commit eee2195

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

Lib/test/test_traceback.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3598,6 +3598,7 @@ def test_no_save_exc_type(self):
35983598
self.assertIsNone(te.exc_type)
35993599

36003600
def test_no_refs_to_exception_and_traceback_objects(self):
3601+
exc_obj = None
36013602
try:
36023603
1/0
36033604
except Exception as e:

0 commit comments

Comments
 (0)