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/shared/utils
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
..
uncommon Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
bh_assert.c Add more checks to enhance security (#446) 2020-11-24 14:00:09 +08:00
bh_assert.h re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00
bh_common.c Implement multi-module feature and bulk-memory feature (#271) 2020-06-02 14:53:06 +08:00
bh_common.h Implement multi-module feature and bulk-memory feature (#271) 2020-06-02 14:53:06 +08:00
bh_hashmap.c Add more checks to enhance security (#446) 2020-11-24 14:00:09 +08:00
bh_hashmap.h introduce WAMR memory profiling tool (experimental) (#390) 2020-09-18 18:04:56 +08:00
bh_list.c re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00
bh_list.h re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00
bh_log.c Fix some compilation warnings and add esp-idf platform for experiment (#454) 2020-11-30 16:03:51 +08:00
bh_log.h Add checks to avoid wasm_runtime_malloc memory with size 0 (#507) 2021-01-28 16:16:02 +08:00
bh_platform.h Eable post-MVP feature wasm-c-api (#315) 2020-07-23 16:54:13 +08:00
bh_queue.c Modify os_cond_reltimedwait to support long time wait (#461) 2020-12-07 17:37:53 +08:00
bh_queue.h Modify os_cond_reltimedwait to support long time wait (#461) 2020-12-07 17:37:53 +08:00
bh_vector.c Eable post-MVP feature wasm-c-api (#315) 2020-07-23 16:54:13 +08:00
bh_vector.h Eable post-MVP feature wasm-c-api (#315) 2020-07-23 16:54:13 +08:00
runtime_timer.c Modify os_cond_reltimedwait to support long time wait (#461) 2020-12-07 17:37:53 +08:00
runtime_timer.h Modify os_cond_reltimedwait to support long time wait (#461) 2020-12-07 17:37:53 +08:00
SConscript add porting codes of rt-thread (#494) 2021-01-14 11:26:35 +08:00
shared_utils.cmake re-org platform APIs, simplify porting process (#201) 2020-03-16 16:43:57 +08:00