wasm-micro-runtime/core/iwasm/common
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
..
arch Implement riscv support for interpreter (#505) 2021-01-25 18:41:48 +08:00
iwasm_common.cmake Implement riscv support for interpreter (#505) 2021-01-25 18:41:48 +08:00
SConscript add porting codes of rt-thread (#494) 2021-01-14 11:26:35 +08:00
wasm_c_api_internal.h Fix some coding style issues, fix doc typo and refine some codes (#392) 2020-09-20 08:20:45 +08:00
wasm_c_api.c Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
wasm_exec_env.c introduce WAMR memory profiling tool (experimental) (#390) 2020-09-18 18:04:56 +08:00
wasm_exec_env.h introduce WAMR memory profiling tool (experimental) (#390) 2020-09-18 18:04:56 +08:00
wasm_memory.c Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
wasm_memory.h Re-org memory allocation interfaces, add --stack-size and --heap-size option (#193) 2020-03-10 19:54:44 +08:00
wasm_native.c Fix some compilation warnings and add esp-idf platform for experiment (#454) 2020-11-30 16:03:51 +08:00
wasm_native.h Implement register/call native API with raw (unextracted) arguments (#222) 2020-04-01 12:52:08 +08:00
wasm_runtime_common.c Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
wasm_runtime_common.h Fix wasi ctx memory free issue when app heap is corrupted (#455) 2020-11-30 17:00:53 +08:00
wasm_shared_memory.c Add more checks to enhance security (#446) 2020-11-24 14:00:09 +08:00
wasm_shared_memory.h implement atomics opcodes for interpreter (#344) 2020-08-10 19:43:58 +08:00