Fix some compile warnings and typos (#3854)
- Clear some compile warnings - Fix some typos - Fix llvm LICENSE link error - Remove unused aot file and binarydump bin - Add checks when loading AOT exports
This commit is contained in:
@ -912,7 +912,7 @@ check_suspend_flags(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
aot_set_last_error("llvm build LOAD failed");
|
||||
return false;
|
||||
}
|
||||
/* Set terminate_flags memory accecc to volatile, so that the value
|
||||
/* Set terminate_flags memory access to volatile, so that the value
|
||||
will always be loaded from memory rather than register */
|
||||
LLVMSetVolatile(terminate_flags, true);
|
||||
|
||||
|
||||
@ -2090,7 +2090,7 @@ aot_compile_op_call_indirect(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
LLVMValueRef *param_values = NULL, *value_rets = NULL;
|
||||
LLVMValueRef *result_phis = NULL, value_ret, import_func_count;
|
||||
#if WASM_ENABLE_MEMORY64 != 0
|
||||
LLVMValueRef u32_max, u32_cmp_result;
|
||||
LLVMValueRef u32_max, u32_cmp_result = NULL;
|
||||
#endif
|
||||
LLVMTypeRef *param_types = NULL, ret_type;
|
||||
LLVMTypeRef llvm_func_type, llvm_func_ptr_type;
|
||||
|
||||
@ -10,6 +10,8 @@
|
||||
#include "aot_emit_gc.h"
|
||||
#endif
|
||||
|
||||
#if WASM_ENABLE_REF_TYPES != 0 || WASM_ENABLE_GC != 0
|
||||
#if WASM_ENABLE_MEMORY64 != 0
|
||||
static bool
|
||||
zero_extend_u64(AOTCompContext *comp_ctx, LLVMValueRef *value, const char *name)
|
||||
{
|
||||
@ -23,6 +25,7 @@ zero_extend_u64(AOTCompContext *comp_ctx, LLVMValueRef *value, const char *name)
|
||||
}
|
||||
return true;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* check whether a table64 elem idx is greater than UINT32_MAX, if so, throw
|
||||
* exception, otherwise trunc it to uint32 */
|
||||
@ -30,10 +33,10 @@ static bool
|
||||
check_tbl_elem_idx_and_trunc(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
LLVMValueRef *elem_idx, uint32 tbl_idx)
|
||||
{
|
||||
#if WASM_ENABLE_MEMORY64 != 0
|
||||
LLVMValueRef u32_max, u32_cmp_result;
|
||||
LLVMBasicBlockRef check_elem_idx_succ;
|
||||
|
||||
#if WASM_ENABLE_MEMORY64 != 0
|
||||
if (!IS_TABLE64(tbl_idx)) {
|
||||
return true;
|
||||
}
|
||||
@ -69,12 +72,15 @@ check_tbl_elem_idx_and_trunc(AOTCompContext *comp_ctx, AOTFuncContext *func_ctx,
|
||||
EXCE_OUT_OF_BOUNDS_TABLE_ACCESS, true,
|
||||
u32_cmp_result, check_elem_idx_succ)))
|
||||
goto fail;
|
||||
#endif
|
||||
|
||||
return true;
|
||||
fail:
|
||||
return false;
|
||||
#else
|
||||
return true;
|
||||
#endif
|
||||
}
|
||||
#endif /* WASM_ENABLE_REF_TYPES != 0 || WASM_ENABLE_GC !=0 */
|
||||
|
||||
uint64
|
||||
get_tbl_inst_offset(const AOTCompContext *comp_ctx,
|
||||
@ -738,4 +744,4 @@ fail:
|
||||
return false;
|
||||
}
|
||||
|
||||
#endif /* WASM_ENABLE_REF_TYPES != 0 || WASM_ENABLE_GC !=0 */
|
||||
#endif /* WASM_ENABLE_REF_TYPES != 0 || WASM_ENABLE_GC !=0 */
|
||||
|
||||
Reference in New Issue
Block a user