Skip to content
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

gh-94438: in frameobject's mark_stacks switch, the PUSH_EXC_INFO and POP_EXCEPT cases are no longer reachable #94582

Merged
merged 2 commits into from
Jul 6, 2022
Merged
Changes from 1 commit
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
14 changes: 6 additions & 8 deletions Objects/frameobject.c
Original file line number Diff line number Diff line change
Expand Up @@ -256,10 +256,6 @@ mark_stacks(PyCodeObject *code_obj, int len)
stacks[i+1] = next_stack;
break;
}
case POP_EXCEPT:
next_stack = pop_value(pop_value(pop_value(next_stack)));
stacks[i+1] = next_stack;
break;
case SEND:
j = get_arg(code, i) + i + 1;
assert(j < len);
Expand Down Expand Up @@ -304,10 +300,12 @@ mark_stacks(PyCodeObject *code_obj, int len)
stacks[i+1] = next_stack;
break;
case PUSH_EXC_INFO:
next_stack = push_value(next_stack, Except);
next_stack = push_value(next_stack, Except);
next_stack = push_value(next_stack, Except);
stacks[i+1] = next_stack;
case POP_EXCEPT:
/* These instructions only appear in exception handlers, which
* skip this switch ever since the move to zero-cost exceptions
* (their stack remains UNINITIALIZED because nothing sets it).
*/
Py_UNREACHABLE();
iritkatriel marked this conversation as resolved.
Show resolved Hide resolved
case RETURN_VALUE:
case RAISE_VARARGS:
case RERAISE:
Expand Down