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
1b1ec715e9
wasm loader: Reject v128 for interpreters ( #3611 )
...
discussed in:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/3592
2024-07-10 13:50:52 +08:00
2cf48c8b9f
Fix typos in wamrc and wasm_export.h ( #3609 )
2024-07-10 12:05:58 +08:00
fc34151df9
Bump ocaml/setup-ocaml from 2 to 3 ( #3604 )
...
Bumps [ocaml/setup-ocaml](https://github.com/ocaml/setup-ocaml ) from 2 to 3.
- [Release notes](https://github.com/ocaml/setup-ocaml/releases )
- [Changelog](https://github.com/ocaml/setup-ocaml/blob/master/CHANGELOG.md )
- [Commits](https://github.com/ocaml/setup-ocaml/compare/v2...v3 )
---
updated-dependencies:
- dependency-name: ocaml/setup-ocaml
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-07-10 11:24:15 +08:00
8a6379bd0a
Add wasm_runtime_get_module_package_type() and wasm_runtime_get_file_package_type() ( #3600 )
...
wasm_runtime_get_file_package_type() is the counterpart of get_file_package_type().
See discussion in #3595 .
2024-07-10 10:45:19 +08:00
8aba85825c
Avoid redefining WASMMemoryType ( #3602 )
2024-07-10 10:05:47 +08:00
0feae05379
wasm loader: Fix several issues in GC and exception handling ( #3586 )
...
Fix several issues of GC and exception handling in wasm loader:
- Should restore param_reftype_maps/param_reftype_map_count/param_count
in the handling of opcode throw
- Should set wasm_ref_type when pushing param types of tag type and block type
if the type is a multi-byte type
- Should set init_values.data as NULL for opcode struct.new_default in load_init_expr
This PR fixes the issues reported in #3411 .
2024-07-05 19:15:58 +08:00
777121217e
CMakeLists.txt: Fix Android pthread linkage ( #3591 )
...
https://developer.android.com/ndk/guides/stable_apis#core_cc
> Note that on Android, unlike Linux, there are no separate libpthread or librt libraries.
That functionality is included directly in libc, which does not need to be explicitly linked against.
Set `THREADS_PREFER_PTHREAD_FLAG` ON and find package `Threads`, then link
`${CMAKE_THREAD_LIBS_INIT}` instead of `-lpthread`.
ps.
https://cmake.org/cmake/help/latest/module/FindThreads.html
2024-07-04 10:07:57 +08:00
1f94cd4ee5
wasm loader: Fix push_frame_offset when pushing v128 type ( #3588 )
...
Fixes issue https://github.com/bytecodealliance/wasm-micro-runtime/issues/3580 .
2024-07-03 15:18:42 +08:00
e3074dc496
Add more arm AOT reloc entries ( #3587 )
...
Add missing reloc entries for Arm AOT. Also sort and remove duplicate.
2024-07-03 14:44:40 +08:00
f118492b1d
Add integer overflow check for some indices in wasm/aot loader ( #3579 )
...
Check whether the indices overflow UINT32_MAX or not for:
- import function count + function count
- import global count + global count
- import tag count + tag count
This PR fixes the issue reported by Oss-fuzz test (#69920 ).
2024-07-02 15:48:37 +08:00
3d4d8e61f0
aot-analyzer: Fix a few printf formats ( #3590 )
2024-07-02 15:32:38 +08:00
212d830eb7
aot-analyzer: Fix macos build ( #3589 )
...
* macOS doesn't have -lrt.
* this program doesn't seem to require librt even on ubuntu.
build tested on macOS and ubuntu.
2024-07-02 15:25:03 +08:00
0d9cea434c
wasm-mutator-fuzz: Set compilers earlier ( #3585 )
...
CMAKE_C_COMPILER etc should be set before project(),
in which cmake tries to decide which compiler to use.
2024-07-02 11:27:31 +08:00
fe4ed6adf2
Fix compilation errors in aot-analyzer tool ( #3584 )
...
Corrected compilation failures due to structure changes, like AOTImportTable.
2024-07-02 11:26:13 +08:00
a5753ea920
interp debugger: Fix setting invalid value to step_count ( #3583 )
...
The `exec_env->current_status->step_count` should be set same as the handling
when WASM_ENABLE_LABELS_AS_VALUES is not 0.
Fixes issue https://github.com/bytecodealliance/wasm-micro-runtime/issues/3475 .
2024-07-02 11:03:49 +08:00
77da87ca51
wasi-nn: Use numpy v1 in wasi-nn test requirements.txt ( #3582 )
...
We need to fix numpy version since the latest is incompatible.
> A module that was compiled using NumPy 1.x cannot be run in
NumPy 2.0.0 as it may crash. To support both 1.x and 2.x
versions of NumPy, modules must be compiled with NumPy 2.0.
Some module may need to rebuild instead e.g. with 'pybind11>=2.12'.
2024-07-02 09:39:46 +08:00
ea582fbc07
wasm-mutator-fuzz: Make compilers overridable ( #3578 )
...
eg.
```shell
cmake .. \
-DCMAKE_C_COMPILER=/usr/local/opt/llvm@15/bin/clang \
-DCMAKE_CXX_COMPILER=/usr/local/opt/llvm@15/bin/clang++
```
2024-07-01 08:43:33 +08:00
837ff63662
Use 64-bit wasm_runtime_enlarge_memory() increment ( #3573 )
...
ps.
https://github.com/bytecodealliance/wasm-micro-runtime/pull/3569#discussion_r1654398315
2024-06-27 14:34:43 +08:00