Commit Graph
76 Commits
Author SHA1 Message Date
TianlongLiangandGitHub e693608476 log warning instaed of assertion (#4119) 2025-03-01 16:46:41 +08:00
TianlongLiangandGitHub e6a47d5cee In wasm32, fix potential conversion overflow when enlarging 65536 pages (#4064)
fix enlarge 65536 pages conversion overflow in wasm32
2025-02-06 14:48:53 +08:00
TianlongLiangandGitHub 5dcffaa7d2 Update Rust target from 'wasm32-wasi' to 'wasm32-wasip1' in CI (#4050)
- update Rust target from 'wasm32-wasi' to 'wasm32-wasip1' in ci
2025-02-01 12:14:06 +08:00
TianlongLiangandGitHub b6dea221a6 Fix wasm loader check data segment count (#4039)
correctly report error when datacount section has non-zero data segment count while the data section is not present
2025-01-21 13:08:09 +08:00
TianlongLiangandGitHub a653746b7b Check whether related table has funcref elem in opcode call_indirect (#3999)
* check whether table has funcref elem in call_indirect
* check whether table has funcref elem in call_indirect when gc is enabled
2025-01-06 13:55:43 +08:00
TianlongLiangandGitHub 1807eec9d2 Add an example of how to embed WAMR in Zephyr user mode (#3998) 2025-01-05 15:34:17 +08:00
TianlongLiangandGitHub 932eb5d9e5 Only access Zephyr thread stats info when it's available (#3962) 2024-12-19 14:26:34 +08:00
TianlongLiangandGitHub 9563909d6c set alignment 4 when loading multi return value (#3955)
set alignment 4 when loading multi return value for all call opcodes
2024-12-12 20:33:46 +08:00
TianlongLiangandGitHub aabe83074e Improvements for platform thread APIs on Windows and Zephyr (#3941)
* improvements for os_thread_join on Windows and Zephyr
2024-12-06 14:39:53 +08:00
TianlongLiangandGitHub 8698d22e67 add thread cpu time for zephyr (#3937) 2024-11-28 11:49:55 +08:00
TianlongLiangandGitHub 1d111a38d6 Fix loader small bug (#3928) 2024-11-26 10:08:51 +08:00
TianlongLiangandGitHub 62aca17279 Check possible integer overflow in aot memory boundary check (#3920)
Check possible integer overflow in aot memory boundary check when
the wasm memory is 64-bit.
2024-11-22 16:01:24 +08:00
TianlongLiangandGitHub f1d03db8e5 Fix CI wamr-ide error (#3913)
The recent version of the rust toolchain will emit ref types opcodes,
which needs to enable this feature in the `iwasm` build.

The vector format parsing logic has some errors in the current version.
I disabled the check for now and am waiting for further investigation.
2024-11-20 10:22:36 +08:00
TianlongLiangandGitHub f2b87d773e Support external toolchain on Windows for aot compiler (#3911)
allowing custom ARC toolchain on Windows
2024-11-19 17:47:05 +08:00
TianlongLiangandGitHub 0e4dffc479 Fix a leak in wasm_loader_emit_br_info (#3900)
Reference Info: 377955855 wamr:wasm_mutator_fuzz_loader: Direct-leak in wasm_loader_emit_br_info

https://issues.oss-fuzz.com/issues/377955855
2024-11-13 15:16:13 +08:00
TianlongLiangandGitHub bf78863c56 Wasm loader enhancement: check code size in code entry (#3892)
add wasm loader check: in code entry, the code size should match the size of vec(locals) + expr, and expr should end with opcode end
2024-11-07 13:38:42 +08:00
TianlongLiangandGitHub 7d56289fab Exclude fuzz test python and npm packages in scoreboard scan (#3871)
* exclude fuzz test for scoreboard scan

* ci ignore osv-scanner.toml file name inconsistency
2024-10-23 14:48:15 +08:00
TianlongLiangandGitHub b34b2c8e26 Add token permissions for CIs to fix issues reported by scorecard (#3867) 2024-10-22 09:13:55 +08:00
TianlongLiangandGitHub bb3f8d9198 release CI: Add another iwasm binary that supports Garbage Collection and Exception Handling (#3866)
As suggested in #3829, in release CI, we add zip/tar.gz artifacts named
iwasm-gc-eh-{version}-{platform} for `iwasm` which supports features
garbage collection and exception handling(classic interpreter only).

Also, add a command line option to control GC heap size for `iwasm` on
the Windows platform.
2024-10-21 08:43:33 +08:00
TianlongLiangandGitHub 7e625a0624 Fix syntax error in codeql_buildscript.sh (#3864) 2024-10-17 15:50:54 +08:00
TianlongLiangandGitHub 1af474099b Add Windows wamrc and iwasm build in release CI (#3857)
- For Windows, llvm libs need to cache more directories, so use a multi-line
  environment variable for paths
- Remove conditionally build directories `win32build`, just use `build` for all platform
- Add Windows wamrc and iwasm(disable lib pthread semaphore and fast jit for now)
  build in release CI
2024-10-17 10:01:56 +08:00
TianlongLiangandGitHub 36d438051e Support table64 extension in classic-interp and AOT running modes (#3811)
Add table64 extension(in Memory64 proposal) support in classic-interp
and AOT running modes, currently still use uint32 to represent table's
initial and maximum size to keep AOT ABI unchanged.
2024-10-11 21:14:56 +08:00
TianlongLiangandGitHub 5ce6f90bd6 Add scoreboard CI for supply-chain security (#3819) 2024-09-27 15:52:00 +08:00
TianlongLiangandGitHub d1141f6f30 aot compiler: Allow to control stack boundary check when boundary check is enabled (#3754)
In the AOT compiler, allow the user to control stack boundary check when the boundary
check is enabled (e.g. `wamrc --bounds-checks=1`). Now the code logic is:

1. When `--stack-bounds-checks` is not set, it will be the same value as `--bounds-checks`.
2. When `--stack-bounds-checks` is set, it will be the option value no matter what the
    status of `--bounds-checks` is.
2024-08-29 11:08:39 +08:00
TianlongLiangandGitHub f4383a9e62 Use node 18.x to build vscode extension (#3735)
Fix the issue of releasing wamr-ide vscode extension:
https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/10467675321/job/28987014745
2024-08-20 17:03:28 +08:00
TianlongLiangandGitHub 63df2cf02d Update std atomic check and simd compatibility check for arc compiler (#3716) 2024-08-16 10:12:23 +08:00
TianlongLiangandGitHub 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
TianlongLiangandGitHub 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
TianlongLiangandGitHub 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
TianlongLiangandGitHub ab4e17b701 Modify logging for windows exception handler and remove unused function (#3489)
ps.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3416
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3400
2024-05-31 13:07:56 +08:00
TianlongLiangandGitHub 30ed97cddc Fix several typos and fix bh_log calculate mills (#3441) 2024-05-20 15:54:01 +08:00
TianlongLiangandGitHub c6d42db598 Correct Exception Handling tag type when GC is enabled (#3413)
Use `WASMFuncType` to represent tag_type in `WASMTagImport` and
`WASMTag` so that the type definition is consistent no matter to GC is
enabled or not.

This PR fixes https://github.com/bytecodealliance/wasm-micro-runtime/issues/3409.
2024-05-13 16:42:01 +08:00
TianlongLiangandGitHub ea13d47a41 ref-types: Correct default value for function local variables (#3397)
In classic interpreter, fast interpreter and fast-jit running modes, set the local
variables' default value to NULL_REF (0xFFFFFFFF) rather than 0 if they are type
of externref or funcref.

The issue was reported in #3390 and #3391.
2024-05-09 16:31:21 +08:00
TianlongLiangandGitHub 79ae910a7c Fix loader and mini-loader select potiential error (#3374)
Fix the issue reported in https://github.com/bytecodealliance/wasm-micro-runtime/issues/3361.
2024-04-29 12:27:55 +08:00
TianlongLiangandGitHub f14a166466 Test more samples in nightly-run CI (#3358)
Build and run sample native-lib and wamr-app-framework's simple
in nightly-run CI.
2024-04-25 20:58:28 +08:00
TianlongLiangandGitHub 30426be82c Refactor CodeQL CI (#3319)
- Move CodeQL scripts to the scripts directory
- Only report error in CI if it's a CodeQL reported issue and was not dismissed
  before and is likely to be an actual error
2024-04-16 16:32:47 +08:00
TianlongLiangandGitHub 4e634bed3f Add necessary comments for doxygen (#3299)
- Add necessary comments for doxygen to generate API documentation
- Update README.md to add a link for End-user APIs documentation
2024-04-11 07:50:08 +08:00
TianlongLiangandGitHub 4a29794a1b Update release CI (#3295)
In the release CI and related scripts, when comparing and printing to the CI,
use the most recent **ancestor** tag(s) for the release branch rather than
the most recent one(s).

And fix the build_wamr_sdk.yml and build_wamr_lldb.yml CIs.
2024-04-09 16:51:36 +08:00
TianlongLiangandGitHub cee9b826a5 Update document for GC, exception handling and memory64 features (#3284)
Add GC, exception handling and memory64 to README.md post MVP feature list,
and update build_wamr.md for how to build them.

And remove `Non-trapping float-to-int conversions`, `Sign-extension operators`,
`Multi-value` links in README since they are in wasm MVP and very common now.
2024-04-07 14:54:02 +08:00
TianlongLiangandGitHub b9740beb31 Disable CodeQL on fork repo (#3262) 2024-03-28 16:17:48 +08:00
TianlongLiangandGitHub 64b6c688a2 posix_file.c: Correct the dirfd argument that passes to fstatat (#3244)
This PR fixes the random failing test case `nofollow_errors` mentioned in
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3222

```C
// dirfd: This is the file descriptor of the directory relative to which the pathname is interpreted. 
int openat(int dirfd, const char *pathname, int flags, ...);
```
The value should be a directory handle instead of a file handle (which is always -1 in this context)
returned from `openat`.
2024-03-22 10:55:39 +08:00
TianlongLiangandGitHub 7486056aee Fix nightly run tsan ASLR issue (#3233)
The nightly run CI reported error:
  "FATAL: ThreadSanitizer: unexpected memory mapping 0x5be565bf3000-0x5be565bfb000"
which is caused by the ASLR issue, we set `vm.mmap_rnd_bits` to 28 to resolve it,
according to the post below:
https://stackoverflow.com/questions/77850769/fatal-threadsanitizer-unexpected-memory-mapping-when-running-on-linux-kernels

ps.
https://github.com/bytecodealliance/wasm-micro-runtime/actions/runs/8319242277/job/22762363873#step:14:2008
2024-03-18 11:15:47 +08:00
TianlongLiangandGitHub de803b2beb Small refactor on WASMModuleInstance and fix Go/Python language bindings (#3227)
- Merge unused field `used_to_be_wasi_ctx` in `AOTModuleInstance` into `reserved` area
- Add field `memory_lock` in `WASMMemoryInstance` for future refactor
- Go binding: fix type error
    https://github.com/bytecodealliance/wasm-micro-runtime/issues/3220
- Python binding:
    type annotation uses the union operator "|", which requires Python version >=3.10
2024-03-14 15:30:28 +08:00
TianlongLiangandGitHub c3e33a96ea Remove unused argument in wasm_runtime_lookup_function and refactor WASMModuleInstance (#3218)
Remove the unused parameter `signature` from `wasm_runtime_lookup_function`.

Refactor the layout of WASMModuleInstance structure:
- move common data members `c_api_func_imports` and `cur_exec_env` from
  `WASMModuleInstanceExtraCommon` to `WASMModuleInstance`
- In `WASMModuleInstance`, enlarge `reserved[3]` to `reserved[5]` in case that
  we need to add more fields in the future

ps.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/2530
https://github.com/bytecodealliance/wasm-micro-runtime/issues/3202
2024-03-13 12:28:45 +08:00
TianlongLiangandGitHub cd63b3b8f2 Fix LLVM assertion failure and update CONTRIBUTING.md (#3197)
The issue was reported in https://github.com/bytecodealliance/wasm-micro-runtime/issues/3188.
2024-03-04 09:01:40 +08:00
TianlongLiangandGitHub 0fa0beba94 VSCode IDE enhancement and readme update (#3172)
- Temporarily disable the deque test for the VS Code extension, as the
  Rust formatter seems to malfunction after a recent VS Code update.
- Add configuration for iwasm host managed heap size, allowing users
  to flexibly `malloc` memory. This also fixes the current bug that when
  default size is 0, it can't run and debug.
- Apply coding style formatting for WAMR IDE source code and add a
  format check for it in CI.
- Update document and some screenshots.
2024-02-22 12:36:49 +08:00
TianlongLiangandGitHub 58c980c4df Fix llvm jit push funcref/externref result type issue (#3169)
When dealing with non-gc enabled funcref/externref, need to make sure
to push them as i32 type.
2024-02-21 12:15:18 +08:00
TianlongLiangandGitHub f359b51525 Fix threads opcodes' boundary check in classic-interp and fast-interp (#3136)
Using `CHECK_BULK_MEMORY_OVERFLOW(addr + offset, n, maddr)` to do the
boundary check may encounter integer overflow in `addr + offset`, change to
use `CHECK_MEMORY_OVERFLOW(n)` instead, which converts `addr` and `offset`
to uint64 first and then add them to avoid integer overflow.
2024-02-06 11:52:30 +08:00
TianlongLiangandGitHub 3d0342fbc8 Fix fast-jit accessing shared memory's fields issue (#2841)
For shared memory, runtime should get the memories pointer from
module_inst first, then get memory instance from memories array,
and then get the fields of the memory instance.
2023-12-01 17:41:24 +08:00
TianlongLiangandGitHub a57e70016a Fix memory.init opcode issue in fast-interp (#2798)
Fix fast interpreter didn't throw OOB exception correctly in some scenarios.
Reported in #2797.
2023-11-20 16:25:43 +08:00
TianlongLiangandGitHub 08c0ec74c4 More precise help info of enabled targets for wamrc (#2783)
Instead of printing all support targets of wamrc, print only the targets
that are included in the LLVM library with which wamrc was compiled.
2023-11-17 19:05:00 +08:00
TianlongLiangandGitHub 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
TianlongLiangandGitHub 059fbfc252 Fix potential issue in aot compiler when translating block opcodes (#2622)
The LLVM zext IR may be inserted after the terminator of a basic block
when popping the arguments of a wasm block. Change to insert the
zext IR before the terminator of the basic block to resolve the issue.

Reported in #2620.
2023-10-08 09:17:54 +08:00
TianlongLiangandGitHub 71e07a7fa4 Fix potential unaligned store issue when extra return value is v128 (#2583)
Unaligned store v128 value to the AOT function argument of the pointer for
the extra return value may cause segmentation fault.

Fix the issue reported in #2556.
2023-09-23 09:06:35 +08:00
TianlongLiangandGitHub c820643b2b wamrc: More friendly to print help info (#2451)
Allow wamrc to print help info like below:
```bash
wamrc --target=help
wamrc --target-abi=help
wamrc --target=<target> --cpu=help
wamrc --target=<target> --cpu=help --cpu-features=+help
```
2023-08-16 11:28:45 +08:00
TianlongLiangandGitHub 6110ea39fd Add hadolint CI for Dockerfile linting (#2387) 2023-07-27 14:54:53 +08:00
TianlongLiangandGitHub e495276646 Add docker file to fix Zephy ESP32 linking issue (#2314)
- Provide a Dockerfile.old to fix issue of ESP32 custom linker scripts not working
  properly with the newer version of Zephyr, as reported in #2263
- Provide a Dockerfile with newer Zephyr for other boards
- Update the corresponding document
2023-07-06 10:11:39 +08:00
TianlongLiangandGitHub efaf37c577 Fix fast-interp issue of LAST_OP_OUTPUT_I32/64 check (#2295) 2023-06-16 10:00:24 +08:00
TianlongLiangandGitHub 8f82b1e8a2 Fix dockerfile linter warnings (#2291) 2023-06-15 16:52:48 +08:00
TianlongLiangandGitHub 2f01cb7b7a Enable static PGO for Linux SGX (#2270)
Enable static PGO for Linux SGX and update the related benchmarks
test scripts and documents.
2023-06-09 14:13:43 +08:00
TianlongLiangandGitHub f10563dfb4 Fix typo in samples/ref-types (#2236) 2023-05-26 07:53:39 +08:00
TianlongLiangandGitHub 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
TianlongLiangandGitHub 7f5d9d4f5e Update document for iwasm/wamrc dependent packages (#2183) 2023-05-08 16:30:56 +08:00
TianlongLiangandGitHub 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
TianlongLiangandGitHub aaf671d688 Fix typo in Fast JIT's BUILD_COND_BR Macro (#2092) 2023-03-31 16:18:43 +08:00
TianlongLiangandGitHub 0ee6e18a06 Rename parameter names in wasm_runtime_instantiate (#2045) 2023-03-22 17:39:08 +08:00
TianlongLiangandGitHub f60c3c6111 Add Multi-tier JIT tests in Ubuntu CI (#1964) 2023-02-16 14:16:41 +08:00
TianlongLiangandGitHub fd487fbe99 CI: Enable Multi-tier JIT by default for released iwasm binary (#1957) 2023-02-14 11:19:52 +08:00
TianlongLiangandGitHub 2953614cb8 Port WAMR to the FreeBSD platform and update the document (#1825) 2022-12-24 10:11:10 +08:00
TianlongLiangandGitHub 6fd8001eb6 Update CIs and documents to make naming of generated binaries consistent (#1823) 2022-12-24 09:17:39 +08:00
TianlongLiangandWenyong Huang fe210f02f2 vscode-extension: Run docker image with the same version as WAMR (#1815) 2022-12-20 14:37:07 +08:00
TianlongLiangandGitHub d0c4c7036b vscode-extension: Run docker image with the same version as WAMR (#1815) 2022-12-16 14:15:32 +08:00
TianlongLiangandGitHub be7a4abee2 Fix source debugger error handling: continue executing when detached (#1725)
Change main thread hangs when encounter debugger encounters error to
main thread exits when debugger encounters error
Change main thread blocks when debugger detaches to
main thread continues executing when debugger detaches, and main thread
exits normally when finishing executing
2022-11-28 22:12:46 +08:00
TianlongLiangandGitHub d9f9e3a92b Update README.md to add link for document website (#1722) 2022-11-21 18:02:02 +08:00
TianlongLiangandGitHub 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
TianlongLiangandGitHub ee210d019f Dockerfile lint errors fix (#1493)
Fix the Dockerfile linter errors and most warnings
2022-09-22 13:06:11 +08:00