Commit Graph

128 Commits

Author SHA1 Message Date
Huang Qi
453a29a9d4
Enable spectest on riscv64 (#2843)
Fix relocation issues on riscv and update test scripts and CI to enable
test spec cases on riscv QEMU.
2023-12-04 14:22:47 +08:00
Huang Qi
d7608690c0
Run spec test for classic/fast-interp in NuttX CI (#2817) 2023-11-27 15:24:02 +08:00
Huang Qi
748e745088
Disable FPU in NuttX spec test (#2781)
Fix spec test failure on NuttX with #2780, see:
https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/6910450452
2023-11-18 09:09:30 +08:00
YAMAMOTO Takashi
562a5dd1b6
Fix data/elem drop (#2747)
Currently, `data.drop` instruction is implemented by directly modifying the
underlying module. It breaks use cases where you have multiple instances
sharing a single loaded module. `elem.drop` has the same problem too.

This PR  fixes the issue by keeping track of which data/elem segments have
been dropped by using bitmaps for each module instances separately, and
add a sample to demonstrate the issue and make the CI run it.

Also add a missing check of dropped elements to the fast-jit `table.init`.

Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2735
Fixes: https://github.com/bytecodealliance/wasm-micro-runtime/issues/2772
2023-11-18 08:50:16 +08:00
TianlongLiang
503d94ace2
Enable more LLVM backends for the release wamrc binary (#2778)
As mentioned in https://github.com/bytecodealliance/wasm-micro-runtime/issues/2504,
the current release `wamrc` only has X86 target enabled. This PR enables
more targets for release `wamrc`, including AArch64, ARM, Mips and RISCV.
2023-11-16 18:32:28 +08:00
Huang Qi
56bfae774c
Update RISC-V compilers in Nuttx compilation CI and spec test CI (#2756)
Update RISC-V compilers in Nuttx compilation CI and spec test CI
to test workflows.

Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
2023-11-14 09:21:58 +08:00
Wenyong Huang
20f1a8c86c Merge branch main into dev/wasi-libc-windows 2023-11-09 10:13:59 +08:00
zoraaver
13875f43c6
Enable WASI tests on Windows CI (#2699)
Most of the WASI filesystem tests require at least creating/deleting a
file to test filesystem functionality so some additional filesystem APIs
have been implemented on Windows so we can test what has been
implemented so far. For those WASI functions which haven't been
implemented, we skip the tests. These will be implemented in a future PR
after which we can remove the relevant filters.

Additionally, in order to run the WASI socket and thread tests, we need
to install the wasi-sdk in CI and build the test source code prior to
running the tests.
2023-11-06 19:24:06 +08:00
Maks Litskevich
0b2313f6f8
Add tsan for fast interp and aot (#2679)
To run it locally:
```bash
export TSAN_OPTIONS=suppressions=<path_to_tsan_suppressions.txt>
./test_wamr.sh <your flags> -T tsan
```

An example for wasi-threads would look like:
```bash
export TSAN_OPTIONS=suppressions=<path_to_tsan_suppressions.txt>
./test_wamr.sh -w -s wasi_certification -t fast-interp -T tsan
```
2023-11-01 18:30:25 +08:00
Wenyong Huang
e222955f31 Merge branch main into dev/wasi-libc-windows 2023-10-09 09:24:00 +08:00
Wenyong Huang
7c22bde8dc
CI: Enable testing AOT multi-module feature (#2621)
And refine some code pieces.
2023-10-08 08:36:49 +08:00
Marcin Kolny
b115b7baac
Fix compilation of shift opcodes on x86_64 and i386 architectures (#2619)
This change fixes the case where the right parameter of shift
operator is negative, specifically, when both parameters of
shift opcode are constants.
2023-10-07 19:55:14 +08:00
Maks Litskevich
28ebd57400
Refactor stress tests to make them runnable in reactor mode (#2614) 2023-10-04 08:10:10 +08:00
Enrico Loparco
00539620e9
Improve stack trace dump and fix coding guideline CI (#2599)
Avoid the stack traces getting mixed up together when multi-threading is enabled
by using exception_lock/unlock in dumping the call stacks.

And remove duplicated call stack dump in wasm_application.c.

Also update coding guideline CI to fix the clang-format-12 not found issue.
2023-09-29 10:52:54 +08:00
dongsheng28849455
79b27c1934
Support muti-module for AOT mode (#2482)
Support muti-module for AOT mode, currently only implement the
multi-module's function import feature for AOT, the memory/table/
global import are not implemented yet.

And update wamr-test-suites scripts, multi-module sample and some
CIs accordingly.
2023-09-28 08:56:11 +08:00
Marcin Kolny
8c2dc1d011
Add unit tests for the tid allocator (#2519)
Add simple infrastructure to add more unit tests in the future. At the moment tests
are only executed on Linux, but can be extended to other platforms if needed.

Use https://github.com/google/googletest/ as a framework.
2023-09-04 13:21:10 +08:00
Maks Litskevich
411b903cee
Add mutex stress test (#2472)
As a part of stress-testing we want to ensure that mutex implementation is working
correctly and protecting shared resource to be allocated from other threads when
mutex is locked.

This test covers the most common situations that happen when some program uses
mutexes like locks from various threads, locks from the same thread etc.
2023-08-30 19:01:44 +08:00
Wenyong Huang
b7a9da1620 Merge branch main into dev/wasi-libc-windows 2023-08-23 17:05:19 +08:00
Wenyong Huang
fa2f29fd8a
Fix issues in releasing wamr-lldb (#2497)
- Update lldb patch due to swig was upgraded to 4.1 in macos
- Export LD_LIBRARY_PATH for searching libpython3.10.so when validating wamr-lldb
  in Ubuntu-20.04
- Rename lldb-wasm.patch to lldb_wasm.path
2023-08-23 12:56:11 +08:00
liang.he
2b30bb0fda
Upgrade swig to 4.1 (#2491)
Upgrade to sig@4.1 when building wamr-lldb on MacOS since swig@3
had been disabled: https://formulae.brew.sh/formula/swig
2023-08-22 13:57:23 +08:00
Marcin Kolny
3534980c9e
Fix spec tests on windows, enable spec tests for windows in CI (#2473) 2023-08-17 19:23:27 +08:00
Maks Litskevich
4ce675aacd
Add another wamr test (#2411)
Follows up #2364 where we discussed that we might want to have a test
which has really short thread function and creates many threads.
2023-08-17 10:31:05 +08:00
Maks Litskevich
a9bd6af0ac
Build wasi-libc from source in WAMR CI (#2465)
We need to apply some bug fixes that were merged to wasi-libc because wasi-sdk-20
is about half a year old.

It is a temporary solution and the code will be removed when wasi-sdk 21 is released.
2023-08-15 10:36:10 +08:00
Wenyong Huang
a07d8160f9
Merge pull request #2426 from bytecodealliance/main
Merge branch main into dev/wasi-libc-windows
2023-08-06 08:50:21 +08:00
Maks Litskevich
b88f2c06c6
Add initial stress test (#2364)
We need to make a test that runs longer than the tests we had before to check
some problems that might happen after running for some time (e.g. memory
corruption or something else).
2023-08-01 17:38:37 +08:00
TianlongLiang
6110ea39fd
Add hadolint CI for Dockerfile linting (#2387) 2023-07-27 14:54:53 +08:00
Marcin Kolny
5463ea4a20
Temporarily disable code that does not compile on windows (#2386)
And return ENOSYS. We do that so we can at least compile the code on CI.
We'll be gradually enabling more and more functions.

Also, enabled `proc_raise()` for windows.
2023-07-25 10:35:05 +08:00
Xu Jun
25a1985413
Add scripts to validate lldb source debugger (#2150) 2023-07-05 15:58:57 +08:00
Zzzabiyaka
10c96b19d0
Add retries to flaky step in nightly run CI (#2306)
Adds more automated way for errors like this:
https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/5328561662

Proposed dependency : https://github.com/nick-fields/retry

Co-authored-by: Maksim Litskevich <makslit@amazon.co.uk>
2023-06-24 09:15:34 +08:00
Ben Riegel
8797c751a5
CI: Update used node version to 16 (#2303)
Since building the extension now depends on node >=16 (see #2292),
build_wamr_vscode_ext.yml will fail on the next release without this change.
2023-06-21 13:41:30 +08:00
Ben Riegel
72fc872afe
wamr-ide: Add vscode extension tests (#2292)
This PR adds tests for #2219 by changing the `compilation_on_android_ubuntu.yml` workflow.
The first run will take about two hours, since LLDB is built from scratch. Later, the build is
cached and the whole job should not take more than three minutes.

Core of the PR is an integration test that boots up vscode and lets it debug a test WASM file.
2023-06-20 15:33:01 +08:00
Zzzabiyaka
85981b77b8
Reduce CI jobs number (#2296)
Fixes #2267.

This PR doesn't decrease the coverage, because every job is tested either per PR or
nightly run (instead of 2 times as it was before). Actually, it even increases it because
Android is tested with Ubuntu 20 now which was disabled before.
2023-06-20 10:41:56 +08:00
Ben Riegel
fca81fcd98
Add Rust Formatters to Debugger (Vector, Map etc.) (#2219)
This PR adds LLDB formatters so that variables are human-readable when debugging
Rust code in VS Code. This includes Tuple, Slice, String, Vector, Map, Enum etc.

It also distributes a standalone Python version with LLDB. This solution enables high
portability, so Ubuntu 20.04 and 22.04 can for example still be supported with the
same build since glibc is statically linked in the Python build, also making it easier to
support more operating systems in the future.

Known Issues: Enum types are not displayed correctly. 

For more details, refer to:
https://github.com/bytecodealliance/wasm-micro-runtime/pull/2219
2023-06-14 19:53:51 +08:00
Zzzabiyaka
27239723a9
Add asan and ubsan to WAMR CI (#2161)
Add nightly (UTC time) checks with asan and ubsan, and also put gcc-4.8 build
to nightly run since we don't need to run it with every PR.

Co-authored-by: Maksim Litskevich <makslit@amazon.co.uk>
2023-05-26 09:45:37 +08:00
TianlongLiang
7c766c2283
Enhance linux-sgx CI (#2102)
Remove unnecessary jobs which have been tested in other CI,
test samples with iwasm-sgx, and add fast-jit to the tests.
2023-05-24 17:41:45 +08:00
Huang Qi
d692878484
Nuttx CI: Ignore the expired certificate for riscv gcc toolchain (#2222) 2023-05-17 15:15:23 +08:00
TianlongLiang
247a49c4fd
CI: More precise trigger paths for github actions (#2157)
Only trigger the necessary github actions when a CI file is changed.
2023-04-27 18:31:39 +08:00
Zzzabiyaka
15139d2bb8
CI: Add ubsan checks to samples/wasm-c-api (#2147)
This PR adds ubsan checks with no alignment enabled to basic CI tests for
samples/wasm-c-api.

Co-authored-by: Maksim Litskevich <makslit@amazon.co.uk>
2023-04-26 09:16:29 +08:00
Wenyong Huang
7e9bf9cdf5
Implement Fast JIT multi-threading feature (#2134)
- Translate all the opcodes of threads spec proposal for Fast JIT
- Add the atomic flag for Fast JIT load/store IRs to support atomic load/store
- Add new atomic related Fast JIT IRs and translate them in the codegen
- Add suspend_flags check in branch opcodes and before/after call function
- Modify CI to enable Fast JIT multi-threading test

Co-authored-by: TianlongLiang <tianlong.liang@intel.com>
2023-04-20 10:09:34 +08:00
YAMAMOTO Takashi
dfca21d239
build_wamr_vscode_ext.yml: vsce publish only on the official repo (#2130)
This makes it simpler to test workflow files on a fork.
2023-04-19 19:39:01 +08:00
YAMAMOTO Takashi
0158eea965
build_wamr_lldb.yml: sync lldb build options between ubuntu and macos (#2132)
Notably, this disables python scripting support on ubuntu:

* It isn't necessary for the primary purpose of this build. (that is, the vscode extension)
* It has been disabled in the macOS counterpart.
* It allows to use the same binary for 22.04 and 20.04. (note: 22.04 and 20.04 provide different versions of libpython)
2023-04-19 14:01:48 +08:00
YAMAMOTO Takashi
dac86af2f2
Update messages/comments to refer the new place of the version definition (#2133) 2023-04-18 21:09:18 +08:00
Marcin Kolny
9adc6948d8
Enable CI build for gcc 4.8 on linux (#2106)
In #1928 we added support for GCC 4.8 but we don't continuously test if it's
working. This PR added a GitHub actions job to test compilation on GCC 4.8
for interpreters and Fast JIT (LLVM JIT/AOT might be added in the future).

The compilation is done using ubuntu 14.04 image as that's the simplest way
to get GCC 4.8 compiler. The job only compiles the code but does not run any
tests.
2023-04-06 10:10:07 +08:00
Wenyong Huang
6af87855b4
Update version number and release notes (#2103)
And restore the CI vsce publish and change the wamride publisher name.
2023-04-04 12:13:40 +08:00
Enrico Loparco
156318f0d4
Use wasi-sdk-20 to build wasi-threads cases in CI (#2095)
wasi-sdk-20 supports older versions of glibc and allow us to use it in the CI
with Ubuntu 20.04.

Refer to
  https://github.com/WebAssembly/wasi-sdk/releases/tag/wasi-sdk-20
And #2021 for previous upgrade to wasi-sdk-20 pre-release.
2023-04-03 08:43:11 +08:00
liang.he
48429da29f
Fix compilation errors of workload xnnpack and meshoptimizer (#2081) 2023-03-30 21:15:21 +08:00
Marcin Kolny
403ccf02b7
ci: Enable WASI threads in CI (#2086) 2023-03-30 10:05:00 +08:00
Marcin Kolny
08a4a7cf08
ci: Refactor windows build definition (#2087) 2023-03-30 09:34:30 +08:00
Huang Qi
19ab3b8812
spectest/nuttx: Increase stack size of iwasm task (#2082) 2023-03-29 17:24:44 +08:00
liang.he
d0fb2716b6
Fix several issues in CI binary releasing (#2064) 2023-03-26 12:19:45 +08:00