diff options
author | Ken Jin <kenjin@python.org> | 2024-02-20 18:47:05 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-20 18:47:05 (GMT) |
commit | 7a8c3ed43abb4b7a18e7a271aaee3ca69c0d83bc (patch) | |
tree | 151f4278e00fd265d7a3acc11cd2c9708d524ac3 /Python/ceval.c | |
parent | e3ad6ca56f9b49db0694f432a870f907a8039f79 (diff) | |
download | cpython-7a8c3ed43abb4b7a18e7a271aaee3ca69c0d83bc.zip cpython-7a8c3ed43abb4b7a18e7a271aaee3ca69c0d83bc.tar.gz cpython-7a8c3ed43abb4b7a18e7a271aaee3ca69c0d83bc.tar.bz2 |
gh-115735: Fix current executor NULL before _START_EXECUTOR (#115736)
This fixes level 3 or higher lltrace debug output `--with-pydebug` runs.
Diffstat (limited to 'Python/ceval.c')
-rw-r--r-- | Python/ceval.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/ceval.c b/Python/ceval.c index 596d5f4..b7a5d62 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1008,7 +1008,7 @@ enter_tier_two: uopcode = next_uop->opcode; DPRINTF(3, "%4d: uop %s, oparg %d, operand %" PRIu64 ", target %d, stack_level %d\n", - (int)(next_uop - current_executor->trace), + (int)(next_uop - (current_executor == NULL ? next_uop : current_executor->trace)), _PyUOpName(uopcode), next_uop->oparg, next_uop->operand, @@ -1030,7 +1030,7 @@ enter_tier_two: { fprintf(stderr, "Unknown uop %d, oparg %d, operand %" PRIu64 " @ %d\n", next_uop[-1].opcode, next_uop[-1].oparg, next_uop[-1].operand, - (int)(next_uop - current_executor->trace - 1)); + (int)(next_uop - (current_executor == NULL ? next_uop : current_executor->trace) - 1)); Py_FatalError("Unknown uop"); } #else |