aot compiler: Fix the length type passed to aot_memmove/aot_memset (#3378)

The current length type of aot_memmove/aot_memset is size_t, and on
a 64 bit host it is uint64, while what the aot code passes to it is uint32,
this might lead to unexpected behavior.

ps. https://github.com/bytecodealliance/wasm-micro-runtime/pull/3376.
This commit is contained in:
Wenyong Huang
2024-05-01 21:40:52 +08:00
committed by GitHub
parent 163f29e51b
commit 835188cc53
4 changed files with 24 additions and 2 deletions

View File

@ -603,6 +603,7 @@ set_local_gc_ref(AOTCompFrame *frame, int n, LLVMValueRef value, uint8 ref_type)
#define INT8_TYPE comp_ctx->basic_types.int8_type
#define INT16_TYPE comp_ctx->basic_types.int16_type
#define INTPTR_T_TYPE comp_ctx->basic_types.intptr_t_type
#define SIZE_T_TYPE comp_ctx->basic_types.size_t_type
#define MD_TYPE comp_ctx->basic_types.meta_data_type
#define INT8_PTR_TYPE comp_ctx->basic_types.int8_ptr_type
#define INT16_PTR_TYPE comp_ctx->basic_types.int16_ptr_type