wasm-micro-runtime/core/shared/utils/uncommon
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
..
bh_getopt.c Add Windows support for C-API and Runtime API libraries and examples. (#379) 2020-09-11 17:36:04 +08:00
bh_getopt.h Add Windows support for C-API and Runtime API libraries and examples. (#379) 2020-09-11 17:36:04 +08:00
bh_read_file.c Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
bh_read_file.h re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00
SConscript add porting codes of rt-thread (#494) 2021-01-14 11:26:35 +08:00
shared_uncommon.cmake re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00