fast-interp: Fix GC opcode ref.as_non_null (#3156)

The issue was found in https://github.com/bytecodealliance/wasm-micro-runtime/issues/3151.
This commit is contained in:
Wenyong Huang
2024-02-17 11:54:49 +08:00
committed by GitHub
parent b0c54c8a86
commit 3a0e86454e
4 changed files with 9 additions and 7 deletions

View File

@ -686,10 +686,12 @@ aot_add_llvm_func(AOTCompContext *comp_ctx, LLVMModuleRef module,
bh_assert(func_index < comp_ctx->func_ctx_count);
bh_assert(LLVMGetReturnType(func_type) == ret_type);
const char *prefix = AOT_FUNC_PREFIX;
const bool need_precheck =
comp_ctx->enable_stack_bound_check || comp_ctx->enable_stack_estimation;
LLVMValueRef precheck_func;
LLVMValueRef precheck_func = NULL;
if (need_precheck) {
precheck_func = aot_add_llvm_func1(comp_ctx, module, func_index,
aot_func_type->param_count,