Skip to content

Commit

Permalink
(Theoretically) improve 'Unknown uop' message
Browse files Browse the repository at this point in the history
  • Loading branch information
gvanrossum committed Nov 20, 2023
1 parent ddba5ed commit 0fae4e6
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -1022,7 +1022,9 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
default:
#ifdef Py_DEBUG
{
fprintf(stderr, "Unknown uop %d, oparg %d\n", opcode, oparg);
fprintf(stderr, "Unknown uop %d, oparg %d, operand %" PRIu64 " @ %d\n",
opcode, next_uop[-1].oparg, next_uop[-1].operand,
(int)(next_uop - current_executor->trace - 1));
Py_FatalError("Unknown uop");
}
#else
Expand Down

0 comments on commit 0fae4e6

Please sign in to comment.