Commit Graph

2016 Commits

Author SHA1 Message Date
67fa155878 libc-wasi: Make rights of STDIN/STDOUT/STDERR fixed and overlook their access modes (#3694)
When determining the file descriptor rights in the function fd_determine_type_rights(),
we assign fixed and unchangeable rights to STDIN, STDOUT and STDERR.

ps.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3686
2024-08-13 10:10:22 +08:00
140ff25d46 wasi-nn: Apply new architecture (#3692)
ps.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3677
2024-08-13 09:14:52 +08:00
4e31bd63b7 wamr-test-suites: Clean up generated tmp files after spec test (#3700)
Add all possible generated tmp files to the list, those not actually generated
will be simply ignored in the deletion process.
2024-08-13 08:38:15 +08:00
da31c079b2 posix_thread.c: Restore old signal alternate stack before thread exit (#3693)
Some host environment may also create an signal alternate stack and access
it after the wasm runtime exits, the runtime should backup the stack info and
restore it before thread exits.

The issue was found in golang:
```
signal 23 received on thread with on signal stack
fatal error: non-Go code disabled signaltstack
```
2024-08-12 12:48:25 +08:00
1362a305f4 Restore linux iwasm default visibility (#3691)
Revert commit 6d8d60d0f0c53d5fb2477506a33bb7308b08596b:
"Set linux iwasm default visibility to hidden also"

Address comments for pull request #3655.
2024-08-07 15:12:38 +08:00
6ddaecafb3 wamrc: Add some help text for --size-level (#3689) 2024-08-07 13:43:47 +08:00
8a2e151de1 CI: Bump NuttX version to 12.6 (#3684) 2024-08-05 09:06:31 +08:00
c3dd5598f6 Fix a compilation warning (#3682)
Fix:
```
wamr/core/iwasm/compilation/aot_llvm.c: In function ‘insert_native_symbol’:
wamr/core/iwasm/compilation/aot_llvm.c:3290:28: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
 3290 |     if (ret < 0 || ret + 1 > sizeof(sym->symbol)) {
      |                            ^
```

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2024-08-03 21:05:18 +08:00
3ce242b5db spec-test-script/runtest.py: Use wamrc --xip option for xip (#3683) 2024-08-02 21:26:18 +08:00
08fad88d75 spec_test_on_nuttx.yml: Retire CONFIG_EOL_IS_LF (#3676)
It has been removed in nuttx while ago:
https://github.com/apache/nuttx/pull/8628
2024-08-02 09:54:07 +08:00
0a56abc6d6 build(deps): bump tensorflow in /core/iwasm/libraries/wasi-nn/test (#3675)
Bumps [tensorflow](https://github.com/tensorflow/tensorflow) from 2.11.1 to 2.12.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.11.1...v2.12.1)

---
updated-dependencies:
- dependency-name: tensorflow
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-08-02 09:17:12 +08:00
c3bd6b495b spec_test_on_nuttx.yml: Replace sed with kconfig-tweak (#3672)
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/3646
2024-07-31 09:45:11 +08:00
6be4b53bdf Add emscripten_sleep() wrapper to libc-emcc (#3669) 2024-07-30 10:52:44 +08:00
a9cd8ba87a Set posix thread name for debug build (#3657) 2024-07-30 07:50:34 +08:00
3b56e7c607 spec_test_on_nuttx.yml: Record more logs (#3670)
Upload artifacts including nuttx config/image and wasm/aot modules
for post-mortem investigations.
2024-07-27 15:38:24 +08:00
84b5221517 spec_test_on_nuttx.yml: Enable xip (#3671)
Related changes:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/3662
https://github.com/bytecodealliance/wasm-micro-runtime/pull/3666
2024-07-27 15:31:31 +08:00
4c5f35b0e3 Zephyr User Mode Support (#3650)
Add support for the [Zephyr Usermode](https://docs.zephyrproject.org/latest/kernel/usermode/index.html)
to the Zephyr port.

The following changes are applied:
- Fix `signbit`, check if it is defined already and only implement it, if not
- Introduce `sys_mutex` and `sys_sem` in favour of `k_mutex` and `k_sem`, when `CONFIG_USERMODE` is enabled
- Remove the installation of the `_stdout_hook_iwasm()` when `CONFIG_USERMODE` is enabled, otherwise this
  causes MPU errors since the std hook is in the kernel space
- Add a thread name for debugging
2024-07-26 20:16:57 +08:00
22df091603 spec_test_on_nuttx.yml: Add xtensa (#3665)
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/3608.
2024-07-26 14:14:04 +08:00
6e727dc18d Support more features for rt-thread (#3661)
1, enable thread mgr
2, enable libc wasi
3, enable libc wasi threads
4, specify a function name of the module to run rather main
2024-07-26 10:34:15 +08:00
4dfdbbb5a5 spec-test-script: Use -mtext-section-literals for xtensa xip (#3666) 2024-07-26 09:40:22 +08:00
83b36558a7 spec-test-script: Skip a few tests for xtensa qemu (#3664)
Because these test cases require more memory than what nuttx on esp32s3 qemu can afford.
2024-07-25 11:59:31 +08:00
2f147fae96 aot compiler: Bail out on too long native symbol names (#3663)
The old code was silently truncating long names.
2024-07-25 11:38:29 +08:00
a055e0b26f aot compiler: Enlarge AOTNativeSymbol->symbol (#3662)
The old value was not enough for wasm_externref_obj_to_internal_obj,
which is 34 characters long.
2024-07-25 11:21:07 +08:00
c05b93f992 aot runtime: Add missing arm/thumb relocations (#3660) 2024-07-25 11:06:41 +08:00
b21e3fd2fa wamr-compiler: Avoid size-level tweak if target is specified (#3659)
If target is specified, assume a cross-build.

Partly fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/3356
2024-07-25 10:39:48 +08:00
b300797b71 wamrc: Add --mllvm= option (#3658)
This allows users to specify llvm command line options, similarly to clang's -mllvm option.

My motivations:
* -debug and friends
* -mtext-section-literals for xtensa
2024-07-24 20:25:45 +08:00
5be8f3580d Set compile symbol visibility to hidden in cmake (#3655)
Set compile symbol visibility to hidden in cmake of root folder and
product-mini/platforms/linux.
2024-07-24 11:37:41 +08:00
79dacfcead spec-test-script/runtest.py: Reduce stack size for aot w/o gc (#3653) 2024-07-23 23:08:26 +08:00
d7521eea4c libc-builtin: Fix a printf format (#3652) 2024-07-23 17:59:31 +08:00
5744e11916 spec-test-script: Make case_last_words larger (#3651)
The current size is usually too small to contain useful info for post mortem investigations.
2024-07-23 17:04:16 +08:00
5e7d3ed59b Add APIs into wasm_c_api.h to summary wasm function execution duration (#3639)
- `wasm_instance_sum_wasm_exec_time()` ->
  `wasm_runtime_sum_wasm_exec_time()`
- `wasm_instance_get_wasm_func_exec_time()` ->
  `wasm_runtime_get_wasm_func_exec_time()`
2024-07-23 16:34:47 +08:00
b086d5820a Change log of import function to be consistent (#3656) 2024-07-23 09:14:49 +08:00
058bc47102 [wasi-nn] Add a new wasi-nn backend openvino (#3603) 2024-07-22 17:16:41 +08:00
50f28495a1 Remove a few hardcoded spec test knowledge from the core library (#3648)
Tweak the stack sizes in the spec test runner instead.
2024-07-22 13:30:00 +08:00
b05fdfd3ba spec-test-script/runtest.py: Use a shorter timeout when expected to fail (#3647)
This is a band-aid fix; ideally we should wait for the expected
failure message directly with a timeout, not the successful prompt
as we currently do.
2024-07-22 13:20:08 +08:00
0d8ffebd39 spec-test-script/runtest.py: Move "--size-level=1" to common place for RISCV64 (#3644) 2024-07-19 11:45:55 +08:00
583fa52226 spec-test-script: Add xtensa case (#3643) 2024-07-18 20:15:12 +08:00
7c9686df5f spec-test-script/runtest.py: Avoid specifying -v=0 unnecessarily (#3642)
The -v=n option is not always available.
Note: WASM_ENABLE_LOG is off by default on NuttX.
2024-07-18 14:49:57 +08:00
2b5b771537 CI: Build llvm for xtensa (#3637) 2024-07-18 13:51:16 +08:00
9f637e6f0a wamr-test-suites/test_wamr.sh: Add an option to specify wamrc binary (#3635) 2024-07-18 13:32:40 +08:00
2879e67aa9 wamr-test-suites: Remove dead code (wasi_test) (#3634) 2024-07-18 12:22:57 +08:00
7c6fc70aea spec-test-script/runtest.py: Don't assume the tmp dir path (#3632)
The current coding assumes the tmp file is created in /tmp.
However,

* It's somewhere under /var/folders/... by default on macOS.

* A user can set TMPDIR.
2024-07-18 10:05:24 +08:00
68fccc4bc5 Fix night run CI (#3640)
Manually git clone and install dependencies instead of using git action on Ubuntu 14.04 runner.
2024-07-17 19:30:35 +08:00
8af155076c Update version to 2.1.1 and update release notes (#3618) 2024-07-16 09:50:11 +08:00
f1fabd5559 Update devcontainer.md (#3628)
Tiny typo fix: from `.devontainer` to `.devcontainer`.
2024-07-16 08:38:55 +08:00
501d7d5adf Add apis to get package version (#3601)
Add three APIs:
- wasm_runtime_get_file_package_version
- wasm_runtime_get_module_package_version
- wasm_runtime_get_current_package_version
2024-07-16 08:15:59 +08:00
7affac0ed3 wasm_application.c: Avoid null pointer dereference (#3620) 2024-07-12 16:59:59 +08:00
c254bffbc5 Fix compile errors on workload bwa and benchmark jetstream (#3617)
Error was reported when building jetstream benchmark with emsdk:
```
clang: error: unsupported option '-msse2' for target 'wasm32-wasi'
```

Error was reported when building bwa workload:
```
fatal: reference is not a tree: 139f68fc4c3747813783a488aef2adc86626b01b
```
2024-07-12 16:58:10 +08:00
73caf19e69 Fix compile warnings/error reported in Windows (#3616)
Clear some compile warnings and fix undefined reference error for symbol ffs
in Windows platform.
2024-07-12 16:43:22 +08:00
46695b992c EH: Use the consistent type for EH handlers (#3619)
The "handlers" on the interpreter stack is sometimes treated as
host pointers and sometimes treated as i64 values. It's quite broken
for targets where pointers are not 64-bit.

This commit makes them host pointers consistently. (at least for
32-bit and 64-bit pointers. We don't support other pointer
sizes anyway.)

Fixes https://github.com/bytecodealliance/wasm-micro-runtime/issues/3110
2024-07-12 11:00:55 +08:00