Commit Graph

23 Commits

Author SHA1 Message Date
Wenyong Huang
64be6ec9a7
Fix potential pointer overflows (#826)
Fix some potential pointer overflows in aot applying relocations and
several other places.
And add sanitizer compiler flags to wamrc CMakeLists.txt to detect
such issues.
2021-11-15 10:57:37 +08:00
Wenyong Huang
3dff80157b
Fix app heap corrupted unchecked issue (#788)
Check whether app heap is corrupted in gc_migrate() and gci_dump(),
and handle the failures in wasm/aot_enlarge_memory().
2021-10-15 20:56:41 +08:00
Wenyong Huang
17f62ad472
Apply clang-format for core/shared and product-mini files (#785)
Apply clang-format for core/shared and product-mini files
2021-10-14 09:12:07 +08:00
Wenyong Huang
7cdfc9fe11
Fix issues reported by gcc -fsanitize flag (#678)
And refine some coding styles, fix JIT compiler data wasm table create issue, add license header for some files.
2021-07-30 15:21:17 +08:00
YAMAMOTO Takashi
15dd651539
Fix os_cond_timedwait and other issues for NuttX sim/macOS (#562) 2021-05-31 09:56:47 +08:00
Wenyong Huang
1b34606940
Move application entry APIs out of wasm_runtime_common.c (#639)
And fix libc-builtin print float issue
Add a list to track all third party components
Fix compile error when MEMORY_TRACING is enabled

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-05-26 13:22:03 +08:00
Wenyong Huang
54e82ec439
Fix app manager fail to install large app file issue (#555)
Remove the limit of app file size no larger than 1 MB, fix possible memory leak issues when fail to install app file, change message size of aee_host_msg_callback() from uint16 type to uint32 type to fix possible integer overflow issue, and fix some coding style issues of app manager.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-03 20:19:24 +08:00
Wenyong Huang
686733170c
Enhance ems memory allocator (#544)
The total size actually allocated by ealloc_hmu() might be larger than the size required to allocate, we reset the total size after allocating, so that if heap verification feature is enabled, the data to verify can be written to the right place of the suffix verification area. And in gc_realloc_vo_internal(), free the heap lock until the original data is copied to new object to return.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-02-25 11:53:17 +08:00
Xu Jun
fc50404115
add uvwasi implementation to support wasi on windows [experimental] (#534)
add uvwasi implementation to support wasi on windows [experimental] and update windows.yml

Co-authored-by: Wenyong Huang <wenyong.huang@intel.com>
2021-02-22 14:17:46 +08:00
alvkeke
8ec03a5165
add porting codes of rt-thread (#494) 2021-01-14 11:26:35 +08:00
Wenyong Huang
788cbf2a19
Refine aot call_indirect opcode translation (#492)
Re-implement aot call_indirect opcode translation: when calling non-import function, translate it by LLVM call IR to call the function in AOTed code, so as to avoid calling runtime aot_call_indirect API which is much slower. For import function, keep calling aot_call_indirect API due to the possible pointer/string argument conversion.

And add prompt info while app heap is corrupted, change emit_leb to emit_uint32 inter fast-interp to refine footprint.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-01-05 18:05:30 +08:00
Yuta Saito
cb0e593c15
Remove debris tlsf in git repo (#475) 2020-12-21 18:24:14 +08:00
Wenyong Huang
91b9458ebd
Add more checks to enhance app heap's security (#428) 2020-10-22 18:52:33 +08:00
lum1n0us
4787b150b8
Enable multi-module support for wasm-c-api (#426)
it is allowed that all imported functions and globals can be
linked by multi-module feature automatically or by wasm-c-api manually
2020-10-16 17:43:57 +08:00
Xu Jun
0226dbbb3d
introduce WAMR memory profiling tool (experimental) (#390) 2020-09-18 18:04:56 +08:00
Wenyong Huang
c8df3f6eed
Fix app heap migrate issue and aot compilation warning (#368) 2020-09-03 11:16:38 +08:00
Wenyong Huang
1b6ddb37d0
Implement libc-WASI for Linux SGX platform and update documents (#343) 2020-08-10 15:12:26 +08:00
wenyongh
b40e79c160
Make heap and linear memory contiguous to refine compilation time and footprint (#233)
Use FastISel for JIT mode
Use united aot version in aot file and aot runtime
Disable check signature failed warning for wamrc
Fix fast interpreter x86_32 float issue
Remove unused empty lvgl folder
2020-04-13 10:49:40 +08:00
Xu Jun
d9890d2ccb
re-org ems mem allocator source codes, update prot_wamr.md (#217) 2020-03-30 11:06:39 +08:00
Xu Jun
f1a0e75ab7
re-org platform APIs, simplify porting process (#201)
Co-authored-by: Xu Jun <jun1.xu@intel.com>
2020-03-16 16:43:57 +08:00
wenyongh
0fdd49ea31
Re-org memory allocation interfaces, add --stack-size and --heap-size option (#193) 2020-03-10 19:54:44 +08:00
wenyongh
180ee4c78a
Add realloc func argument for memory allocator (#191) 2020-03-08 21:18:18 +08:00
wenyongh
46b93b9d22 Enable AoT and wamr-sdk, and change arguments of call wasm API (#157)
* Implement memory profiler, optimize memory usage, modify code indent

* Implement memory.grow and limit heap space base offset to 1G; modify iwasm build type to Release and 64 bit by default

* Add a new extension library: connection

* Fix bug of reading magic number and version in big endian platform

* Re-org platform APIs: move most platform APIs from iwasm to shared-lib

* Enhance wasm loader to fix some security issues

* Fix issue about illegal load of EXC_RETURN into PC on stm32 board

* Updates that let a restricted version of the interpreter run in SGX

* Enable native/app address validation and conversion for wasm app

* Remove wasm_application_exectue_* APIs from wasm_export.h which makes confused

* Refine binary size and fix several minor issues

Optimize interpreter LOAD/STORE opcodes to decrease the binary size
Fix issues when using iwasm library: _bh_log undefined, bh_memory.h not found
Remove unused _stdin/_stdout/_stderr global variables resolve in libc wrapper
Add macros of global heap size, stack size, heap size for Zephyr main.c
Clear compile warning of wasm_application.c

* Add more strict security checks for libc wrapper API's

* Use one libc wrapper copy for sgx and other platforms; remove bh_printf macro for other platform header files

* Enhance security of libc strcpy/sprintf wrapper function

* Fix issue of call native for x86_64/arm/mips, add module inst parameter for native wrapper functions

* Remove get_module_inst() and fix issue of call native

* Refine wgl lib: remove module_inst parameter from widget functions; move function index check to runtime instantiate

* Refine interpreter call native process, refine memory boudary check

* Fix issues of invokeNative function of arm/mips/general version

* Add a switch to build simple sample without gui support

* Add BUILD_TARGET setting in makefile to replace cpu compiler flags in source code

* Re-org shared lib header files, remove unused info; fix compile issues of vxworks

* Add build target general

* Remove unused files

* Update license header

* test push

* Restore file

* Sync up with internal/feature

* Sync up with internal/feature

* Rename build_wamr_app to build_wasm_app

* Fix small issues of README

* Enhance malformed wasm file checking
Fix issue of print hex int and implement utf8 string check
Fix wasi file read/write right issue
Fix minor issue of build wasm app doc

* Sync up with internal/feature

* Sync up with internal/feature: fix interpreter arm issue, fix read leb issue

* Sync up with internal/feature

* Fix bug of config.h and rename wasi config.h to ssp_config.h

* Sync up with internal/feature

* Import wamr aot

* update document

* update document

* Update document, disable WASI in 32bit

* update document

* remove files

* update document

* Update document

* update document

* update document

* update samples

* Sync up with internal repo
2020-01-21 13:26:14 +08:00