Skip to content
This repository was archived by the owner on Sep 6, 2023. It is now read-only.

Commit 68e71ea

Browse files
committed
py/vm: Fix bug with stackless mode and unwinding of exceptions.
This patch fixes a regression introduced by 71a3d6e Previous to this patch the n_state variable was referring to that computed at the very start of the mp_execute_bytecode function. This patch fixes it so that n_state is recomputed when the code_state changes.
1 parent 982e676 commit 68e71ea

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

py/vm.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1436,6 +1436,7 @@ unwind_jump:;
14361436
} else if (code_state->prev != NULL) {
14371437
mp_globals_set(code_state->old_globals);
14381438
code_state = code_state->prev;
1439+
size_t n_state = mp_decode_uint_value(code_state->fun_bc->bytecode);
14391440
fastn = &code_state->state[n_state - 1];
14401441
exc_stack = (mp_exc_stack_t*)(code_state->state + n_state);
14411442
// variables that are visible to the exception handler (declared volatile)

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy