Skip to content
Snippets Groups Projects
Unverified Commit b22f9d6e authored by Irit Katriel's avatar Irit Katriel Committed by GitHub
Browse files

[3.11] gh-94438: in frameobject's mark_stacks switch, the PUSH_EXC_INFO and...

[3.11] gh-94438: in frameobject's mark_stacks switch, the PUSH_EXC_INFO and POP_EXCEPT cases are no longer reachable (GH-94582) (GH-94595)

(cherry picked from commit 50b9a776)

Co-authored-by: default avatarIrit Katriel <1055913+iritkatriel@users.noreply.github.com>
parent 5f4a16b2
No related branches found
No related tags found
No related merge requests found
...@@ -256,10 +256,6 @@ mark_stacks(PyCodeObject *code_obj, int len) ...@@ -256,10 +256,6 @@ mark_stacks(PyCodeObject *code_obj, int len)
stacks[i+1] = next_stack; stacks[i+1] = next_stack;
break; break;
} }
case POP_EXCEPT:
next_stack = pop_value(pop_value(pop_value(next_stack)));
stacks[i+1] = next_stack;
break;
case SEND: case SEND:
j = get_arg(code, i) + i + 1; j = get_arg(code, i) + i + 1;
assert(j < len); assert(j < len);
...@@ -304,10 +300,16 @@ mark_stacks(PyCodeObject *code_obj, int len) ...@@ -304,10 +300,16 @@ mark_stacks(PyCodeObject *code_obj, int len)
stacks[i+1] = next_stack; stacks[i+1] = next_stack;
break; break;
case PUSH_EXC_INFO: case PUSH_EXC_INFO:
next_stack = push_value(next_stack, Except); case POP_EXCEPT:
next_stack = push_value(next_stack, Except); /* These instructions only appear in exception handlers, which
next_stack = push_value(next_stack, Except); * skip this switch ever since the move to zero-cost exceptions
stacks[i+1] = next_stack; * (their stack remains UNINITIALIZED because nothing sets it).
*
* Note that explain_incompatible_stack interprets an
* UNINITIALIZED stack as belonging to an exception handler.
*/
Py_UNREACHABLE();
break;
case RETURN_VALUE: case RETURN_VALUE:
case RAISE_VARARGS: case RAISE_VARARGS:
case RERAISE: case RERAISE:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment