This repository has been archived on 2023-11-05. You can view files and clone it, but cannot push or open issues or pull requests.
wasm-micro-runtime/core/iwasm/compilation
Wenyong Huang a5188f5574
Add checks to avoid wasm_runtime_malloc memory with size 0 (#507)
In some platforms, allocating memory with size 0 may return NULL but not an empty memory block, which causes runtime load, instantiate or execute wasm/aot file failed. We add checks to try to avoid allocating memory in runtime if the size is 0. And in wasm_runtime_malloc/free, output warning if allocate memory with size 0 and free memory with NULL ptr.
Also fix some coding style issues, fix handle riscv32 ilp32d issue, and fix several wasm-c-api issues.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-01-28 16:16:02 +08:00
..
simd Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
aot_compiler.c Implement SIMD float ceil/floor/trunc/nearest opcodes (#472) 2020-12-16 15:33:25 +08:00
aot_compiler.h Add more checks to enhance security (#446) 2020-11-24 14:00:09 +08:00
aot_emit_aot_file.c Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
aot_emit_compare.c Enable AoT and wamr-sdk, and change arguments of call wasm API (#157) 2020-01-21 13:26:14 +08:00
aot_emit_compare.h Enable AoT and wamr-sdk, and change arguments of call wasm API (#157) 2020-01-21 13:26:14 +08:00
aot_emit_const.c Fix app heap migrate issue and aot compilation warning (#368) 2020-09-03 11:16:38 +08:00
aot_emit_const.h Enable AoT and wamr-sdk, and change arguments of call wasm API (#157) 2020-01-21 13:26:14 +08:00
aot_emit_control.c Update wasm app build scripts for wasi-sdk-12 and refine interpreter (#481) 2020-12-28 10:46:31 +08:00
aot_emit_control.h enable pthread for AoT && update AOT current version to 2 (#311) 2020-07-16 20:35:04 +08:00
aot_emit_conversion.c Implement post-MVP features and native stack overflow check (#243) 2020-04-30 17:52:11 +08:00
aot_emit_conversion.h Implement post-MVP features and native stack overflow check (#243) 2020-04-30 17:52:11 +08:00
aot_emit_exception.c Refine aot exception throw, remove unnecessary labels (#456) 2020-11-30 17:57:22 +08:00
aot_emit_exception.h Enable AoT and wamr-sdk, and change arguments of call wasm API (#157) 2020-01-21 13:26:14 +08:00
aot_emit_function.c Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
aot_emit_function.h support tail-call in AoT (#419) 2020-10-13 08:34:31 +08:00
aot_emit_memory.c Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
aot_emit_memory.h Import SIMD feature and add some workload samples (#438) 2020-11-05 18:15:15 +08:00
aot_emit_numberic.c Fix some issues for Arm platform. (#457) 2020-12-02 10:22:55 +08:00
aot_emit_numberic.h Enable AoT and wamr-sdk, and change arguments of call wasm API (#157) 2020-01-21 13:26:14 +08:00
aot_emit_parametric.c Import SIMD feature and add some workload samples (#438) 2020-11-05 18:15:15 +08:00
aot_emit_parametric.h Enable AoT and wamr-sdk, and change arguments of call wasm API (#157) 2020-01-21 13:26:14 +08:00
aot_emit_variable.c Import SIMD feature and add some workload samples (#438) 2020-11-05 18:15:15 +08:00
aot_emit_variable.h Enable AoT and wamr-sdk, and change arguments of call wasm API (#157) 2020-01-21 13:26:14 +08:00
aot_llvm_extra.cpp Fix wamr compiler issues and refine some error messages (#470) 2020-12-15 13:05:39 +08:00
aot_llvm.c Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
aot_llvm.h Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
aot.c Support AssemblyScript's new/retain/release APIs (#460) 2020-12-07 16:37:49 +08:00
aot.h Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
iwasm_compl.cmake Fix jit target arch not set issue and custom name section typo issue (#400) 2020-09-24 11:21:20 +08:00