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:
@ -1973,10 +1973,12 @@ aot_set_llvm_basic_types(AOTLLVMTypes *basic_types, LLVMContextRef context,
|
||||
if (pointer_size == 4) {
|
||||
basic_types->intptr_t_type = basic_types->int32_type;
|
||||
basic_types->intptr_t_ptr_type = basic_types->int32_ptr_type;
|
||||
basic_types->size_t_type = basic_types->int32_type;
|
||||
}
|
||||
else {
|
||||
basic_types->intptr_t_type = basic_types->int64_type;
|
||||
basic_types->intptr_t_ptr_type = basic_types->int64_ptr_type;
|
||||
basic_types->size_t_type = basic_types->int64_type;
|
||||
}
|
||||
|
||||
basic_types->gc_ref_type = basic_types->int8_ptr_type;
|
||||
|
||||
Reference in New Issue
Block a user