Commit Graph

1131 Commits

Author SHA1 Message Date
dependabot[bot]
2c5e7bc650
Bump tensorflow from 2.10.0 to 2.10.1 in /core/iwasm/libraries/wasi-nn/test (#1735)
Bumps [tensorflow](https://github.com/tensorflow/tensorflow) from 2.10.0 to 2.10.1.
- [Release notes](https://github.com/tensorflow/tensorflow/releases)
- [Changelog](https://github.com/tensorflow/tensorflow/blob/master/RELEASE.md)
- [Commits](https://github.com/tensorflow/tensorflow/compare/v2.10.0...v2.10.1)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-11-22 16:21:06 +08:00
Wenyong Huang
da7117a092
Refine the stack frame size check in interpreter (#1730)
Limit max_stack_cell_num/max_csp_num to be no larger than UINT16_MAX,
and don't check all_cell_num in interpreter again.

And refine some codes in interpreter.
2022-11-22 15:32:48 +08:00
Zeuson
656a8427e6
linux-sgx: Improve the remote attestation (#1695)
The current implementation of remote attestation does not take into
account the integrity of the wasm module. The SHA256 of the wasm
module has been put into user_data to generate the quote, and more
parameters are exposed for further verification.
2022-11-22 14:45:03 +08:00
Wenyong Huang
87c3195d47
Revert "Implement call Fast JIT function from LLVM JIT jitted code" (#1737)
Reverts bytecodealliance/wasm-micro-runtime#1714, which was merged mistakenly.
2022-11-22 14:04:48 +08:00
Wenyong Huang
440bbea81e
Fix interp/fast-jit float min/max issues (#1733) 2022-11-22 09:14:20 +08:00
TianlongLiang
d9f9e3a92b
Update README.md to add link for document website (#1722) 2022-11-21 18:02:02 +08:00
Wenyong Huang
89f9d695ed
Fix fast jit issue of translating opcode i32.rem_s/i64.rem_s (#1731) 2022-11-21 16:37:10 +08:00
Wenyong Huang
cf7b01ad82
Implement call Fast JIT function from LLVM JIT jitted code (#1714)
Basically implement the Multi-tier JIT engine.
And update document and wamr-test-suites script.
2022-11-21 10:42:18 +08:00
liang.he
3daa512925
Remove unused export index check in wasm-c-api (#1720) 2022-11-20 18:47:02 +08:00
Huang Qi
4e5ba6f6ef
Fix issue of thumb relocation R_ARM_THM_MOVT_ABS (#1723) 2022-11-19 19:36:02 +08:00
Xu Jun
032b9aa74b
Fix issue of restoring wasm operand stack (#1721) 2022-11-18 18:51:13 +08:00
liang.he
021130f4a3
Add more compilation groups of fast jit into CI (#1717) 2022-11-17 16:46:25 +08:00
Huang Qi
b5efadf205
nuttx: Enable ref types by Kconfig (#1711) 2022-11-17 11:56:59 +08:00
Therdel
b68477267c
Refine the build_wasm_app.md formatting (#1713) 2022-11-17 11:55:51 +08:00
TrellixVulnTeam
7ad3412591
Adding tarfile member sanitization to extractall() (#1709)
Fix a widespread bug named CVE-2007-4559, which is a 15 year old bug
in the Python tarfile package. By using extract() or extractall() on a tarfile
object without sanitizing input, a maliciously crafted .tar file could
perform a directory path traversal attack. This patch essentially checks to
see if all tarfile members will be extracted safely and throws an exception
otherwise.
2022-11-17 11:52:30 +08:00
Wenyong Huang
6c16ff7654
Update document and clear compile warnings (#1701)
Update build wasm app document, add how to set buildflags for Rust
project to reduce the footprint.

Clear Windows warnings and a shadow warning in aot_emit_numberic.c
2022-11-15 15:02:23 +08:00
Wenyong Huang
375a2c9a49
Fix sample ref-types/wasm-c-api build error with wat2wasm low version (#1702)
Fix build error in sample ref-types and wasm-c-api caused by the
version of wat2wasm: refine makefile to auto detect the wat2wasm
version and add the compile flag accordingly.
2022-11-15 13:51:03 +08:00
liang.he
c718e76dea
Use wabt binary instead of building from source in spec test (#1700)
Directly download wabt binary and use it in spec test instead of
building it from source to fasten the spec test.
2022-11-14 15:16:22 +08:00
Wenyong Huang
c70e1ebc3d
Avoid generating some unused LLVM IRs (#1696)
Refine the generated LLVM IRs at the beginning of each LLVM AOT/JIT function
to fasten the LLVM IR optimization:
- Only create argv_buf if there are func calls in this function
- Only create native stack bound if stack bound check is enabled
- Only create aux stack info if there is opcode set_global_aux_stack
- Only create native symbol if indirect_mode is enabled
- Only create memory info if there are memory operations
- Only create func_type_indexes if there is opcode call_indirect
2022-11-14 14:32:35 +08:00
Huang Qi
4b0660cf24
Fix missing float cmp for XIP (#1699) 2022-11-14 11:58:38 +08:00
Wenyong Huang
cef4e74fee
Clear "redundant move" warning when build LLVM (#1697)
Clear warnings like below when building LLVM JIT and wamrc:
  llvm-project/llvm/include/llvm/ExecutionEngine/Orc/IndirectionUtils.h:73:25:
  warning: redundant move in return statement [-Wredundant-move]
  73 |         return std::move(Err);
2022-11-14 10:51:18 +08:00
YAMAMOTO Takashi
ff4ee4a95f
Add comments around wasm_runtime_set_wasi_args (#1692) 2022-11-09 17:18:22 +08:00
liang.he
30ee992762
Add wasm_module_obtain() to clone wasm_module_t (#1660)
Also add support for wasm_shared_module_t, and add lock for
wasm_module_t related operations.

And add wasm-c-api sample threads, update sample clone.
2022-11-09 12:50:58 +08:00
dongsheng28849455
f59ffa0d63
Enable Nuttx spec test option and register aot symbols (#1687)
Enable spec test option on Nuttx platform.
Register sqrt/sqrtf in aot global symbol map and
_fixdfdi/__floatundidf in xtensa symbol map.
2022-11-08 12:42:19 +08:00
Jämes Ménétrey
328fd59f43
linux-sgx: Allow to open files with arbitrary paths in the sandbox using IPFS (#1685)
A limitation of the current implementation of SGX IPFS in WAMR is that
it prevents to open files which are not in the current directory.
This restriction is lifted and can now open files in paths, similarly to the
WASI openat call, which takes into account the sandbox of the file system.
2022-11-07 19:56:16 +08:00
Wenyong Huang
7fd37190e8
Add control for the native stack check with hardware trap (#1682)
Add a new options to control the native stack hw bound check feature:
- Besides the original option `cmake -DWAMR_DISABLE_HW_BOUND_CHECK=1/0`,
  add a new option `cmake -DWAMR_DISABLE_STACK_HW_BOUND_CHECK=1/0`
- When the linear memory hw bound check is disabled, the stack hw bound check
   will be disabled automatically, no matter what the input option is
- When the linear memory hw bound check is enabled, the stack hw bound check
  is enabled/disabled according to the value of input option
- Besides the original option `--bounds-checks=1/0`, add a new option
  `--stack-bounds-checks=1/0` for wamrc

Refer to: https://github.com/bytecodealliance/wasm-micro-runtime/issues/1677
2022-11-07 18:26:33 +08:00
Huang Qi
810007857b
wamr-test-suites: Update runtest.py to support python3 (#1684)
Update runtest.py of wamr-test-suites to support both python2 and python3
2022-11-07 14:16:10 +08:00
Xu Jun
e278861206
Avoid raising exception when debugging with VSCode (#1686) 2022-11-07 11:57:53 +08:00
Wang Xin
8d96f31547
Vote for new nominated TSC members (#1673)
* Vote for new introduced TSC members

* Correct the TSC member github ID
2022-11-07 11:11:43 +08:00
Jämes Ménétrey
aba267afc7
linux-sgx: Improve the documentation of SGX-RA sample (#1679)
Improve the documentation for setting up SGX-RA using WAMR, based on
the feedback in #1670.

This notably highlights the dependency on Intel PCS and PCCS and how to
install/configure them.
2022-11-04 14:14:18 +08:00
Huang Qi
4b6e4e1732
Correct the arch name for armv7a on NuttX (#1678) 2022-11-03 21:54:05 +08:00
dongsheng28849455
52ebd98ff4
Fix a build failure error on nuttx (#1675)
NuttX doesn't have SO_REUSEPORT.
2022-11-03 16:29:58 +08:00
Huang Qi
c8cacbd883
Add LLVM_BUILD_OP_OR_INTRINSIC to avoid code dup (#1672) 2022-11-03 11:48:48 +08:00
dongheng
9ba8c8957d
esp-idf: Add socket support for esp-idf platform (#1364)
Support to get/set recv_buf_size/send_buf_size/reuse_port/reuse_addr for wasm app
Add socket APIs for esp-idf platform
Add setsockopt for linux-sgx platform
2022-11-02 18:02:58 +08:00
TianlongLiang
3b4033aceb
Allow source debugger reconnection (#1667)
Allow to wait for a new debugger connection once the previous one
is disconnected:
- when receiving a detach command
- when the client socket is closed (for example, lldb process is killed)
2022-11-02 17:12:34 +08:00
Wenyong Huang
5b144c491d
Avoid initialize LLVM repeatedly (#1671)
Currently we initialize and destroy LLVM environment in aot_create_comp_context
and aot_destroy_comp_context, which are called in wasm_module_load/unload,
and the latter may be invoked multiple times, which leads to duplicated LLVM
initialization/destroy and may result in unexpected behaviors.

Move the LLVM init/destroy into runtime init/destroy to resolve the issue.
2022-11-02 16:13:58 +08:00
liang.he
f1f6f4a125
Remove unused codes in AOT compiler (#1668)
Remove the setup of JIT LLVMOrcIRTransformLayerSetTransform and
LLVMOrcObjectTransformLayerSetTransform which is commented.
2022-11-02 08:32:16 +08:00
YAMAMOTO Takashi
825544ddab
samples/native-lib: use the same shared lib name as product-mini (#1669)
Use the shared lib name `libiwasm` instead of static lib name `vmlib`
2022-11-01 21:55:43 +08:00
Huang Qi
94cecbe4cb
Fix XIP issues of fp to int cast and int rem/div (#1654) 2022-11-01 20:29:07 +08:00
liang.he
a1f7832625
Remove an improper assumption when creating wasm_trap (#1657)
Allow to have multiple stores in an engine and multiple instances
in a store. Letting a wasm_function_t pass its wasm_store_t to make
it more efficient.
2022-11-01 11:56:28 +08:00
Blaine Bublitz
101ea0ea3c
Update libuv version number (#1666)
Update the libuv version to work around a mingw64 bug, refer to:
  https://github.com/libuv/libuv/pull/3345
2022-11-01 11:07:35 +08:00
dongsheng28849455
e517dbc7b2
XIP adaptation for xtensa platform (#1636)
Add macro WASM_ENABLE_WORD_ALING_READ to enable reading
1/2/4 and n bytes data from vram buffer, which requires 4-byte addr
alignment reading.

Eliminate XIP AOT relocations related to the below ones:
   i32_div_u, f32_min, f32_max, f32_ceil, f32_floor, f32_trunc, f32_rint
2022-10-31 17:25:24 +08:00
liang.he
dba9e52f2f
Change wasm-c-api default log level (#1658)
Change wasm-c-api default log level to output less logs by default:
- For debug mode, change log level from 5 to 4
- For release mode, change log level from 3 to 2
2022-10-31 14:02:00 +08:00
Wenyong Huang
0f5b73ae67
Add mutex initializer for wasm-c-api engine operations (#1656)
The host embedder may new/delete wasm-c-api engine simultaneously
in multiple threads, which requires lock for the operations. Since there
isn't one time called global init/destroy APIs provided by wasm-c-api,
we define a global lock and initialize it with thread mutex initializer if
the platform supports that, and use it to lock the operations of engine.

If the platform doesn't support thread mutex initializer, we require
developer to create the lock by himself to ensure the thread-safe of the
engine operations.
2022-10-31 11:48:07 +08:00
YAMAMOTO Takashi
960b613d10
samples/native-lib: Add an example to use wamr API from native lib (#1649)
Real world native libs likely need to access the wasm_runtime_xxx API.
This example demonstrates it.

Build vmlib as a shared lib to make it straightforward to share a
single runtime instance between iwasm and native libs.
2022-10-28 19:31:21 +08:00
Wenyong Huang
84161fe084
Add CIs to release new version and publish binary files (#1648)
Add CIs to enable the release process of a new version of WAMR,
and build and publish the binary files when a version is released,
including iwasm, wamrc, lldb, vscode-extension and wamr-ide for
Ubuntu-20.04, Ubuntu-22.04 and MacOS.

And refine the CIs to test spec cases.
2022-10-28 13:55:41 +08:00
YAMAMOTO Takashi
77ff7daaf4
Add wasm_runtime_unregister_natives (#1647)
Allow to unregister (or unload) the previously registered native libs,
so that no need to restart the whole engine by using
`wasm_runtime_destroy/wasm_runtime_init`.
2022-10-28 11:03:39 +08:00
YAMAMOTO Takashi
bc58778c34
samples/native-lib: Add a bit more complicated example (#1643)
Add test_hello sample and update the document
2022-10-27 15:06:14 +08:00
Jämes Ménétrey
264fdfafed
linux-sgx: Use non-destructive modes for opening files using SGX IPFS (#1645)
Refer to https://github.com/bytecodealliance/wasm-micro-runtime/pull/1645
2022-10-27 12:21:30 +08:00
YAMAMOTO Takashi
15d645476a
Update the top level CMakeLists.txt a bit (#1642)
Disable -Wunused-parameter in the top level CMakeLists.txt as this repo
has tons of it. Note: We have this particular warning disabled in
build-scripts/runtime_lib.cmake too.

Bump minimum cmake version for the top level CMakeLists.txt to fix the
following warning on macOS.

```
CMake Warning (dev):
  Policy CMP0042 is not set: MACOSX_RPATH is enabled by default. Run "cmake
  --help-policy CMP0042" for policy details. Use the cmake_policy command to
  set the policy and suppress this warning.
MACOSX_RPATH is not specified for the following targets: iwasm_shared
This warning is for project developers.  Use -Wno-dev to suppress it.
```
2022-10-27 11:27:34 +08:00