Skip to content

Commit

Permalink
Fix watchpoint segfault when using debug interpreter without server
Browse files Browse the repository at this point in the history
  • Loading branch information
cimacmillan committed Dec 12, 2022
1 parent 1449275 commit e8fc477
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/iwasm/interpreter/wasm_interp_classic.c
Original file line number Diff line number Diff line change
Expand Up @@ -1157,8 +1157,10 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module,
#if WASM_ENABLE_DEBUG_INTERP != 0
uint8 *frame_ip_orig = NULL;
WASMDebugInstance *debug_instance = wasm_exec_env_get_instance(exec_env);
bh_list *watch_point_list_read = &debug_instance->watch_point_list_read;
bh_list *watch_point_list_write = &debug_instance->watch_point_list_write;
bh_list *watch_point_list_read =
debug_instance ? &debug_instance->watch_point_list_read : NULL;
bh_list *watch_point_list_write =
debug_instance ? &debug_instance->watch_point_list_write : NULL;
#endif

#if WASM_ENABLE_LABELS_AS_VALUES != 0
Expand Down

0 comments on commit e8fc477

Please sign in to comment.