diff --git a/core/iwasm/interpreter/wasm_interp_classic.c b/core/iwasm/interpreter/wasm_interp_classic.c index b4128392..6a5e9ae1 100644 --- a/core/iwasm/interpreter/wasm_interp_classic.c +++ b/core/iwasm/interpreter/wasm_interp_classic.c @@ -495,6 +495,12 @@ wasm_interp_get_frame_ref(WASMInterpFrame *frame) } while (0) #endif +#if UINTPTR_MAX == UINT64_MAX +#define PUSH_PTR(value) PUSH_I64(value) +#else +#define PUSH_PTR(value) PUSH_I32(value) +#endif + /* in exception handling, label_type needs to be stored to lookup exception * handlers */ @@ -1892,19 +1898,19 @@ wasm_interp_call_func_bytecode(WASMModuleInstance *module, switch (handler_opcode) { case WASM_OP_CATCH: skip_leb(lookup_cursor); /* skip tag_index */ - PUSH_I64(end_addr); + PUSH_PTR(end_addr); break; case WASM_OP_CATCH_ALL: - PUSH_I64(end_addr); + PUSH_PTR(end_addr); break; case WASM_OP_DELEGATE: skip_leb(lookup_cursor); /* skip depth */ - PUSH_I64(end_addr); + PUSH_PTR(end_addr); /* patch target_addr */ (frame_csp - 1)->target_addr = lookup_cursor; break; case WASM_OP_END: - PUSH_I64(0); + PUSH_PTR(0); /* patch target_addr */ (frame_csp - 1)->target_addr = end_addr; break;