From 7bb78dc260cb5465906731a0bb7192738b43b66c Mon Sep 17 00:00:00 2001 From: Wenyong Huang Date: Thu, 2 Feb 2023 15:23:44 +0800 Subject: [PATCH] Remove fast jit macro in enum WASMExceptionID (#1933) The definitions `enum WASMExceptionID` in the compilation of wamrc and the compilation of Fast JIT are different, since the latter enables the Fast JIT macro while the former doesn't. This causes that the exception ID in AOT file generated by wamrc may be different from iwasm binary compiled with Fast JIT enabled, and may result in unexpected behavior. Remove the macro control to resolve it. --- core/iwasm/common/wasm_runtime_common.c | 2 -- core/iwasm/interpreter/wasm_runtime.h | 2 -- 2 files changed, 4 deletions(-) diff --git a/core/iwasm/common/wasm_runtime_common.c b/core/iwasm/common/wasm_runtime_common.c index db35b01d..0cd2af3f 100644 --- a/core/iwasm/common/wasm_runtime_common.c +++ b/core/iwasm/common/wasm_runtime_common.c @@ -2235,9 +2235,7 @@ static const char *exception_msgs[] = { "wasm auxiliary stack underflow", /* EXCE_AUX_STACK_UNDERFLOW */ "out of bounds table access", /* EXCE_OUT_OF_BOUNDS_TABLE_ACCESS */ "wasm operand stack overflow", /* EXCE_OPERAND_STACK_OVERFLOW */ -#if WASM_ENABLE_FAST_JIT != 0 "failed to compile fast jit function", /* EXCE_FAILED_TO_COMPILE_FAST_JIT_FUNC */ -#endif "", /* EXCE_ALREADY_THROWN */ }; /* clang-format on */ diff --git a/core/iwasm/interpreter/wasm_runtime.h b/core/iwasm/interpreter/wasm_runtime.h index 89c5bbee..3ede9bf4 100644 --- a/core/iwasm/interpreter/wasm_runtime.h +++ b/core/iwasm/interpreter/wasm_runtime.h @@ -63,9 +63,7 @@ typedef enum WASMExceptionID { EXCE_AUX_STACK_UNDERFLOW, EXCE_OUT_OF_BOUNDS_TABLE_ACCESS, EXCE_OPERAND_STACK_OVERFLOW, -#if WASM_ENABLE_FAST_JIT != 0 EXCE_FAILED_TO_COMPILE_FAST_JIT_FUNC, -#endif EXCE_ALREADY_THROWN, EXCE_NUM, } WASMExceptionID;