Commit Graph
100 Commits
Author SHA1 Message Date
Wenyong HuangandGitHub 7db2221ad9 Re-org address unalignment access for fast-interp (#597)
And clear some compile warnings on wasm loader, add ${UV_A_LIBS} for some CMakeLists.txt.
2021-04-01 16:50:46 +08:00
Wenyong HuangandGitHub 5a13e1bbbc Fix compile warnings of wasm-c-api and add more checks (#592) 2021-03-25 10:13:34 +08:00
Wenyong HuangandGitHub be54b4c7cc Fix sample littlevgl/gui build issues on zephyr platform (#588)
Fix sample littlevgl/guil build issues on zephyr platform, modify code of zephyr platform by adding some macros to control some apis to fit different zephyr version, and align to zephyr-v2.3.0 for sample littlevgl/gui as the latest zephyr version (>=v2.4.0) requires that the thread stack for the thread to create must be defined by macro but not allocating stack memory dynamically.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-23 14:20:50 +08:00
Wenyong HuangandGitHub 02d27e13ee Fix some compilation warnings and enable Windows JIT (#586) 2021-03-22 19:28:51 +08:00
Wenyong HuangandGitHub 68ff3a830e Set AOT code and data readonly after relocation (#579) 2021-03-18 20:03:40 +08:00
Wenyong HuangandGitHub fda3a26903 Fix some relocation type issues in windows (#574)
Implement Windows PE file relocation type IMAGE_REL_AMD64_ADDR64/ADDR32/REL32, implement relocation for symbol "__xmm@xxx"/"__plt@xxx"/".rdata", implement Windows invokeNative simd asm code and enable SIMD by default for windows platform. Also update wamrc tool.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-16 16:59:16 +08:00
Wenyong HuangandGitHub b06ae7272f Remove heap size check when creating wasi ctx (#565)
Remove check for heap_size==0 when creating wasi ctx, as the related data structures are allocated from global heap instead of app heap now, so it also works when app heap isn't created.
Also add v128 type for Windows so as to fix wamrc compilation error in Windows platform.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-10 16:25:07 +08:00
Wenyong HuangandGitHub 9327f20ae2 Upgrade llvm version from 10.x to 11.x for wamrc and iwasm JIT (#564)
Upgrade it as the latest version of wasi-sdk and emsdk are based on llvm-11, align to it to use the same compiler version. And this also fixes compilation error when building wamrc with llvm-10 in Windows platform.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-10 16:08:50 +08:00
Wenyong HuangandGitHub e9e75a6b09 Fix interpreter not update memory size after call native func (#563)
The native function might call wasm function exported, in which the memory.grow opcode might be executed, and interpreter should update memory size after that, or load/store opcodes may run failed with "out of bounds memory access" exception thrown.

Update tensorflow sample patch, allow tensorflow wasm app to grow memory so as to run more models. And fix some compile issues of littlevgl zephyr sample for latest zephyr source code.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-10 15:07:16 +08:00
Wenyong HuangandGitHub a1568825e8 Enable to use BH_VPRINTF macro to redirect stdout output (#560)
Enable to use BH_VPRINTF macro for platform Linux/Windows/Darwin/VxWorks to redirect the stdout output from platform os_printf/os_vprintf, or the wasi output from wasm app to the vprintf like callback function specified by BH_VPRINTF macro of cmake WAMR_BH_VPRINTF variable.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-06 22:29:58 +08:00
Wenyong HuangandGitHub a4239f1ffd Enable SIMD by default for wamrc and iwasm (#559)
Enable SIMD by default for wamrc on x86-64 target, for iwasm on platform Linux and Darwin. And update build wamr document, fix app manager compile warning.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-03-06 21:30:14 +08:00
Wenyong HuangandGitHub 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 HuangandGitHub fe76ce3b68 Update global initialization process for latest spec cases (#553) 2021-03-02 18:24:15 +08:00
Wenyong HuangandGitHub 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
Wenyong HuangandGitHub 3849ece496 Fix auxiliary stack size not 16-byte aligned issue (#524) 2021-02-10 10:11:32 +08:00
Wenyong HuangandGitHub 1630cb2524 Fix duplicated destroy shared memory's lock issue (#514)
And add native symbol node to list head when registering native symbol, so as to lookup developer's registered node firstly when linking.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-02-07 11:05:48 +08:00
Wenyong HuangandGitHub 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
Wenyong HuangandGitHub efd648959c Update README.md 2021-01-25 18:43:44 +08:00
Wenyong HuangandGitHub 240ca2ed46 Implement performance profiler and call stack dump, and update toolchain document (#501)
And remove redundant FAST_INTERP macros in wasm_interp_fast.c, and fix wamrc --help wrong line order issue.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-01-18 13:23:10 +08:00
Wenyong HuangandGitHub 8a477786f1 Remove unused block_addr_cache buffer in wasm loader (#493)
And fix possible memory leak issue in aot loader when apply relocation failed.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2021-01-08 19:11:12 +08:00
Wenyong HuangandGitHub 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
Wenyong HuangandGitHub 365ec6360b Update build scripts and documents of workload samples for wasi-sdk-12.0 (#484)
Update the build scripts of sample workloads (meshoptimizer/bwa/wasm-av1) to use the wasi-sdk-12.0 firstly to build the workload and discard clang-11, as wasi-sdk-12 supports wasi, simd and pthread better. And update the related documents.
Also modify wasm mini loader to sync up with the change of wasm normal loader.

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2020-12-29 14:41:09 +08:00
Wenyong HuangandGitHub 724858c731 Update wasm app build scripts for wasi-sdk-12 and refine interpreter (#481)
Update wasm app build scripts for wasi-sdk-12.0: add --export=__main_argc_argv, remove --no-threads
Lookup function with name "__main_argc_argv" as main function besides "main"
Change module_malloc to runtime_malloc in wasi native lib
Refine classic interpreter op_block and op_br_table
Refine faster interpreter op_br_table

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2020-12-28 10:46:31 +08:00
Wenyong HuangandGitHub adb05ea719 Enable SIMD support for Linux SGX platform (#474) 2020-12-21 15:17:36 +08:00
Wenyong HuangandGitHub ad35c3c21b Implement SIMD float ceil/floor/trunc/nearest opcodes (#472)
Implement SIMD f32x4/f64x2 ceil/floor/trunc/nearest opcodes

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2020-12-16 15:33:25 +08:00
Wenyong HuangandGitHub 16e6f41b3a Fix wamr compiler issues and refine some error messages (#470)
Fix potential memory leak issue when using llvm::EngineBuilder().selectTarget()
Fix issue of accessing aot_value's fields after it is freed
Fix JIT not print failed to link import warning
Change some error messages: 'fail to' to 'failed to'
Update error message when SIMD isn't enabled
Fix install littlevgl wasm app of wasi version failed

Signed-off-by: Wenyong Huang <wenyong.huang@intel.com>
2020-12-15 13:05:39 +08:00
Wenyong HuangandGitHub 388530c738 Modify os_cond_reltimedwait to support long time wait (#461)
Modify the argument of os_cond_reltimedwait to uint64 type to support long time wait, and handle possible integer overflow.
2020-12-07 17:37:53 +08:00
Wenyong HuangandGitHub 5176fe2595 Fix timer setTimeout issue and some coding style issues (#459) 2020-12-04 18:07:52 +08:00
Wenyong HuangandGitHub 2f530e67fc Fix app manager install atomics app issue and optimize workload scripts (#458) 2020-12-04 15:35:45 +08:00
Wenyong HuangandGitHub 591e4ce536 Refine aot exception throw, remove unnecessary labels (#456) 2020-11-30 17:57:22 +08:00
Wenyong HuangandGitHub 0700dc9cd4 Fix wasi ctx memory free issue when app heap is corrupted (#455) 2020-11-30 17:00:53 +08:00
Wenyong HuangandGitHub 282831eba5 Fix some compilation warnings and add esp-idf platform for experiment (#454)
And fix some code indent issues.
2020-11-30 16:03:51 +08:00
Wenyong HuangandGitHub 0359805c82 Import FreeRTOS platform experiment codes for further development (#451) 2020-11-26 19:10:05 +08:00
Wenyong HuangandGitHub 74be7a0b7c Add more checks to enhance security (#446)
add more checks to enhance security
clear "wasi proc exit" exception before return to caller in wasm/aot call functions
fix memory profiling issue
change movdqa to movdqu in simd invokeNative asm codes to fix issue of unaligned address access
move setjmp/longjmp from libc-builtin to libc-emcc
fix zephyr platform compilation issue in latest zephyr version
2020-11-24 14:00:09 +08:00
Wenyong HuangandGitHub f4770ae8c8 Add more llvm optimization passes (#445)
Add more llvm optimization passes to improve AOT/JIT performance
2020-11-23 10:48:22 +08:00
Wenyong HuangandGitHub 892af84161 Update sample workload wasm-av1 and add workload XNNPACK (#443) 2020-11-13 17:53:23 +08:00
Wenyong HuangandGitHub a3074df21b Import SIMD feature and add some workload samples (#438) 2020-11-05 18:15:15 +08:00
Wenyong HuangandGitHub 667282eea9 Implement stat and getentropy for sgx with ocall to run tensorflow (#436) 2020-10-30 12:36:00 +08:00
Wenyong HuangandGitHub 91b9458ebd Add more checks to enhance app heap's security (#428) 2020-10-22 18:52:33 +08:00
Wenyong HuangandGitHub dc536538ad Fix sgx enclave module not destroyed issue when loading module failed (#410) 2020-09-29 10:34:06 +08:00
Wenyong HuangandGitHub a3d374eb57 Fix jit target arch not set issue and custom name section typo issue (#400)
And set target machine's cpu to host cpu when creating JIT execution engine.

Signed-off-by: Wenyong Huang wenyong.huang@intel.com
2020-09-24 11:21:20 +08:00
Wenyong HuangandGitHub e501a6963b Fix some coding style issues, fix doc typo and refine some codes (#392) 2020-09-20 08:20:45 +08:00
Wenyong HuangandGitHub c8df3f6eed Fix app heap migrate issue and aot compilation warning (#368) 2020-09-03 11:16:38 +08:00
Wenyong HuangandGitHub 034606b0a9 Change wasm app offset type from int32 to uint32 (#361)
And fix some sign/unsigned conversion compilation warnings.
2020-08-26 18:33:29 +08:00
Wenyong HuangandGitHub 0103f6429c Refactor error/exception strings to reduce binary size (#359) 2020-08-21 15:11:31 +08:00
Wenyong HuangandGitHub 89d2937cde Refactor app heap and memory boundary check, and fix os_printf compilation error (#356)
Insert app heap before __heap_base, or before new page
Fix os_printf compilation error in some platforms
2020-08-20 12:43:12 +08:00
Wenyong HuangandGitHub 8c820730ba Add cmake variable to set the max app thread stack size (#346) 2020-08-11 14:47:24 +08:00
Wenyong HuangandGitHub 1b6ddb37d0 Implement libc-WASI for Linux SGX platform and update documents (#343) 2020-08-10 15:12:26 +08:00
Wenyong HuangandGitHub aa7b0ba6b6 Fix wamrc link error and arm assembly code issue (#335) 2020-08-05 09:07:30 +08:00
Wenyong HuangandGitHub ed8ddb2cea Disable some components in llvm build script to decrease binary size (#330) 2020-08-03 12:38:22 +08:00
Wenyong HuangandGitHub 93ca9d8c62 Disable memory shrink opt when memory.size opcode is found (#323) 2020-07-30 10:18:55 +08:00
Wenyong HuangandGitHub 88af12501d Implement ecall to handle commands from host to call enclave runtime APIs (#320) 2020-07-28 16:18:54 +08:00
Wenyong HuangandGitHub 056b824ac4 Fix fast interpreter i64 shift issue for non-x86 arch (#319) 2020-07-28 13:46:37 +08:00
wenyonghandGitHub 16a284a67c Fix compile issue of zephyr (#306) 2020-07-09 16:07:41 +08:00
wenyonghandGitHub 2fc7230009 Enhance the native stack overflow check (#302) 2020-07-07 09:56:46 +08:00
wenyonghandGitHub ee3d448eb6 Fix aot issue in 32-bit platform (#297)
fix aot 32-bit boundary check issue
2020-07-01 12:22:13 +08:00
wenyonghandGitHub 847dccaa34 Refine get/set global opcodes for interpreter (#294) 2020-06-29 14:17:27 +08:00
wenyonghandGitHub ee315e4049 Implement memory access bound check with hardware trap for 64-bit platforms (#293)
Also implement native stack overflow check with hardware trap for 64-bit platforms
Refine classic interpreter and fast interpreter to improve performance
Update document
2020-06-28 15:41:25 +08:00
wenyonghandGitHub 10980a1dd7 Fix app manager parse applet name issue (#280) 2020-06-11 14:19:55 +08:00
wenyonghandGitHub 7a287fd1a9 Implement wasm mini loader and refine footprint of loader and runtime (#276) 2020-06-08 11:19:09 +08:00
wenyonghandGitHub 752826a667 Implement multi-module feature and bulk-memory feature (#271)
Refine wasm loader and aot loader
Fix potential issue of os_mmap/os_munmap
Update document
2020-06-02 14:53:06 +08:00
wenyonghandGitHub a0bb761beb Update API comments, refine footprint of wasm loader (#256)
and fix issues of get native stack boundary
2020-05-15 17:44:36 +08:00
wenyonghandGitHub 7abd1ca813 Change llvm void pointer to i8 pointer to avoid assert failed (#250) 2020-05-08 13:40:04 +08:00
wenyonghandGitHub 44ccfd20ad Fix issue of condition settings of app boundary check (#249) 2020-05-08 13:34:07 +08:00
wenyonghandGitHub e8e45aeecd Refine aot stack overflow check and enhance wasm loader malformed checks (#248)
And separate global data from wasm memory instance
2020-05-08 12:38:59 +08:00
wenyonghandGitHub d381b0fdec Implement post-MVP features and native stack overflow check (#243)
Implement native thread stack overflow check
Implement post-MVP: Non-trapping float-to-int conversions
Implement post-MVP: Sign-extension operators
Enhance WASM loader checks
2020-04-30 17:52:11 +08:00
wenyonghandGitHub f72e848114 Refine aot memory boundary check, add more llvm passes (#236)
Fix issue of some error info mismatch with spec cases
2020-04-22 18:43:50 +08:00
wenyonghandGitHub 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
wenyonghandGitHub c1a0e6d877 Implement register/call native API with raw (unextracted) arguments (#222) 2020-04-01 12:52:08 +08:00
wenyonghandGitHub 01e85144f4 Enable aarch64 support, add component test framework and test suite (#211)
and refine aot call indirect op
2020-03-24 19:04:29 +08:00
wenyonghandGitHub c6042c45a3 Sync with internal feature (#204) 2020-03-18 17:49:23 +08:00
wenyonghandGitHub 751a3b5865 Enhance interpreter performance (#196) 2020-03-12 08:59:02 +08:00
wenyonghandGitHub 0fdd49ea31 Re-org memory allocation interfaces, add --stack-size and --heap-size option (#193) 2020-03-10 19:54:44 +08:00
wenyonghandGitHub 180ee4c78a Add realloc func argument for memory allocator (#191) 2020-03-08 21:18:18 +08:00
wenyonghandGitHub cfcaca3d35 Refine build script of zephyr product-mini, enable aot soft-float support (#188) 2020-03-05 21:46:24 +08:00
wenyonghandGitHub 0d3f304191 Implement native function pointer check, addr conversion and register, update documents (#185)
Modified WASM runtime API:
- wasm_runtime_module_malloc()
- wasm_runtime_lookup_function()
Introduced runtime API
- wasm_runtime_register_natives()
2020-03-04 20:12:38 +08:00
wenyonghandGitHub 9a961c4843 Enable ARM and THUMB AOT support, enable Android platform support (#182)
* Sync with internal/feature: enable arm aot and android platform
2020-02-27 16:38:44 +08:00
wenyonghandGitHub 4dbe7c44d0 Fix block addr cache uninitialized issue in aot compiler (#181) 2020-02-27 15:33:56 +08:00
wenyonghandGitHub 72d9e886e8 Merge two levels of hash cache of branch block address into one (#173) 2020-02-22 21:05:08 +08:00
wenyonghandGitHub 4979379246 Update iwasm_main.c 2020-02-22 09:39:46 +08:00
wenyonghandGitHub 0fb40f3f9a Remove unused build folders (#168)
Former-commit-id: 227d49486acda8b73fb55c99356f329fad128961
Former-commit-id: 375c1ac00078baac1bae481e26eabbf8428bfa5e
2020-02-18 15:57:21 +08:00
wenyonghandGitHub e62bbeb9e8 Refine wasm loader and interpreter, enhance wamrc to support SGX (#167)
Former-commit-id: 76f4a121d3c2a67114414fc60e80eba4bf49aa8e [formerly b1ab47945a40e6b249c9aa205d61281301585ea6]
Former-commit-id: 8e5c6e895eae22051a79a8d337a87cd2f431b6bc
2020-02-18 15:15:24 +08:00
wenyonghandGitHub b5cbc02e90 Refine interpreter to improve performance (#162) 2020-02-10 15:42:37 +08:00
wenyonghandGitHub 256ecdfdf9 Refine interpreter to improve performance, refine memory usage (#161) 2020-02-10 12:36:45 +08:00
wenyonghandGitHub 130d7d07d0 Update document, fix typo of wamrc help info (#158) 2020-01-21 14:24:10 +08:00
wenyonghandWang Xin 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
wenyonghandGitHub 2b12e2c957 Add thumb target, implement xtensa invokeNative asm code and update makefiles (#151) 2019-12-24 11:09:54 +08:00
wenyonghandGitHub 5875a37f34 Remove iwasm/runtime/platform src files, refine interpreter and fix issue of --repl option (#150) 2019-12-18 11:53:43 +08:00
wenyonghandGitHub 631b7a2403 Enhance wasm loader and interpreter, enhance code security and update document (#149) 2019-12-13 15:30:30 +08:00
wenyonghandGitHub 1c81ad6da5 Enhance wasm loader and update build app document (#147) 2019-11-27 10:52:12 +08:00
wenyonghandGitHub 7c5a84cf75 Update README, change wasi primitive lib position and add some exception checks (#146)
Add exception throw when some initial checks fail in executing main or specific function
2019-11-25 23:16:40 +08:00
wenyonghandGitHub be15c08cf3 Remove unused files and update license header of some files (#138) 2019-11-11 20:38:49 -06:00
wenyonghandGitHub 49127efa99 Re-org shared lib header files, remove unused info (#136)
And fix compile issues of vxworks
2019-11-04 18:56:27 -06:00
wenyonghandGitHub 28993946ad Add BUILD_TARGET setting in makefile (#135) 2019-11-01 00:38:45 -05:00
wenyonghandGitHub f8f61dc898 Add a switch to build simple sample without gui support (#126)
* 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
2019-09-25 03:42:56 -05:00
wenyonghandGitHub 2fca3aa3f5 Re-implement invokeNative function of arm/mips/general version (#125)
Re-implement them due to the function prototype was changed.
Fix typo of sample/gui/README.
2019-09-22 21:52:39 -05:00
wenyonghandGitHub 42dc2d65a1 Refine interpreter call native process and memory boundary check (#124) 2019-09-19 04:05:15 -05:00
wenyonghandGitHub 6e99a37bf2 Refine wgl lib and refine wasm function index check (#122)
Refine wgl lib: remove module_inst parameter from widget functions
Refine wasm function check: move function index check from interpreter call_indirect to runtime instantiate
2019-09-16 14:49:17 +08:00
wenyonghandGitHub ff0267b7e6 Remove get_module_inst() and fix issue of call native (#120) 2019-09-11 15:56:47 +08:00
wenyonghandGitHub 26149021ff Add parameter module inst for native wrapper functions (#117)
And add asm code of em64/arm/mips version to call native wrapper functions;
Fix some issues of calling wrapper functions;
2019-09-10 10:23:46 +08:00