Skip to content

Commit 994ff73

Browse files
committed
py/mpstate: Make mp_pending_exception volatile.
It can change asynchronously.
1 parent a24eafa commit 994ff73

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

py/mpstate.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ typedef struct _mp_state_vm_t {
105105
mp_map_t mp_loaded_modules_map;
106106

107107
// pending exception object (MP_OBJ_NULL if not pending)
108-
mp_obj_t mp_pending_exception;
108+
volatile mp_obj_t mp_pending_exception;
109109

110110
// current exception being handled, for sys.exc_info()
111111
#if MICROPY_PY_SYS_EXC_INFO

0 commit comments

Comments
 (0)