Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

gh-94215: Fix reference count issue in exception_unwind #94659

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 2 Lib/test/test_pdb.py
Original file line number Diff line number Diff line change
Expand Up @@ -2085,7 +2085,7 @@ def test_issue42383(self):
expected = '(Pdb) The correct file was executed'
self.assertEqual(stdout.split('\n')[6].rstrip('\r'), expected)

@unittest.skip("test crashes, see gh-94215")
# @unittest.skip("test crashes, see gh-94215")
def test_gh_94215_crash(self):
script = """\
def func():
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Fix a reference counting bug in exception unwinding code for zero-cost
exception handling. The code did not take into account that
``frame_setlineno()`` can pop off stacks, too.
iritkatriel marked this conversation as resolved.
Show resolved Hide resolved
Patch by Irit Katriel and Christian Heimes.
5 changes: 2 additions & 3 deletions 5 Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -5683,16 +5683,15 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
err = maybe_call_line_trace(tstate->c_tracefunc,
tstate->c_traceobj,
tstate, frame, instr_prev);
stack_pointer = _PyFrame_GetStackPointer(frame);
frame->stacktop = -1;
if (err) {
/* trace function raised an exception */
next_instr++;
goto error;
}
/* Reload possibly changed frame fields */
next_instr = frame->prev_instr;

stack_pointer = _PyFrame_GetStackPointer(frame);
frame->stacktop = -1;
}
}
}
Expand Down
Morty Proxy This is a proxified and sanitized view of the page, visit original site.