Commit Graph

2463 Commits

Author SHA1 Message Date
ca40f30e5b baremetal: add baremetal platform 2026-01-30 00:16:08 +01:00
888655330c readme: add fork notice 2026-01-28 18:14:33 +01:00
8c18e3f68b Bump version to 2.4.4 (#4722) 2025-11-25 07:11:08 +08:00
5149c4b11f cherry picks few PRs from main branch (#4725)
* fix: update git clone branch for threads spec to main-legacy (#4687)
* Fast-interp should report unsupport opcode when meeting simd opcode on non-posix platforms (#4723)
2025-11-24 16:49:50 +08:00
de1d635efb Merge commit from fork
* fix: remove SIMD prefix handling from interpreter and update opcode definitions

* test: add case for classic interpreter handling of unsupported SIMD opcodes
2025-11-24 14:37:46 +08:00
ea7ac262a3 Merge commit from fork 2025-11-24 14:23:05 +08:00
d2a7b25409 Add inputs for optional WAMR releases in the release process workflow (#4486) (#4715) 2025-11-24 13:27:01 +08:00
0e47872fb4 Bump version to 2.4.3 (#4662)
- relase notes
- bump version
2025-10-14 14:30:36 +08:00
8bd6794de6 libc-wasi: add missing pointer validations to socket functions (#4611) (#4665)
* libc-wasi: add missing pointer validations to socket functions (#4611)
cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4463
the fix for sock_addr_resolve is incomplete.
cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4610

* Sync from main branch
  - wasi_sock_recv doesn't use src_addr
  - check src_addr before coverting

* CI: use windows-2022 image for now (#4633)

github is currently rolling out windows-2025 image.
for some reasons, the "path_symlink_trailing_slashes" test case in
wasi testsuite fails on windows-2025 image.
someone familar with windows need to investigate what was the
key difference between 2022 and 2025.
until that happens, this commit makes our CI use windows-2022 image.

cf.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/4632
https://github.com/actions/runner-images/issues/12677

---------

Co-authored-by: YAMAMOTO Takashi <yamamoto@midokura.com>
2025-10-14 09:29:30 +08:00
6450d87299 bump version to 2.4.2 (#4626) 2025-09-15 17:11:18 +08:00
87fb38256b Add release notes for WAMR-2.4.2 (#4624) 2025-09-15 15:35:58 +08:00
9530e4a310 Merge commit from fork 2025-09-15 15:19:51 +08:00
b124f70345 Bump version to 2.4.1 (#4513) 2025-07-28 20:49:11 +08:00
d298a66d38 bump AOT_CURRENT_VERSION for extended-const (#4511)
cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4504
2025-07-27 14:39:35 +08:00
121232a995 Merge commit from fork
If `--addr-pool=1.2.3.4`, the runtime will return an error.
The value must be in the form of ADDRESS/MASK.
2025-07-27 14:38:56 +08:00
c080aa80d0 add a CL option to specify shared heap size 2025-07-22 05:01:14 +02:00
8ae3bf7080 build(deps): Bump github/codeql-action from 3.29.2 to 3.29.3
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.2 to 3.29.3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.29.2...v3.29.3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.3
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-07-22 04:53:52 +02:00
a780ffdc43 lib-socket: make getaddrinfo return EAI_ values (#4498)
cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4464
2025-07-21 09:21:31 +08:00
952b35d11d Add CI on Zephyr (#4336)
to run product-mini/platforms/zephyr/simple and
product-mini/platforms/zephyr/user-mode

Construct a T2 (star topology) for the current smoke test. This is not the
final topology, and we may modify it once we determine the optimal
configuration.
2025-07-21 09:21:01 +08:00
e4d2673a7c wasi-nn: add a comment on load_by_name_with_config (#4492)
this api has been introduced by
https://github.com/bytecodealliance/wasm-micro-runtime/pull/3709
in which i couldn't find any explanations.

this comment is my best guess.
2025-07-17 09:50:49 +08:00
248e10b79e nn-cli: add an option to use load_by_name (#4490)
by specifying a name for --load-graph.
for example,
```
--load-graph=name=foo
```
2025-07-17 09:47:20 +08:00
79408e59cc wamr-wasi-extensions: document (#4493) 2025-07-17 09:44:47 +08:00
34f5d13444 doc/socket_api.md: some historical notes (#4494) 2025-07-17 09:43:54 +08:00
704aa3e7e5 modify macro related to simde when WASM_OP_SELECT_128 (#4461)
* remove macro of fast interpreter when WASM_OP_SELECT_128
* Modified some macros related to SIMDE
2025-07-17 08:04:41 +08:00
46d4e248bb posix os_socket_accept: stop assuming socklen_t is unsigned int (#4488) 2025-07-17 08:04:13 +08:00
db942f3aaf wasi_socket_ext.c: fix error reporting
do not return __WASI_ERRNO_xxx error code where 0/-1 is more appropriate.

most of them were not harmful because the value of
__WASI_ERRNO_SUCCESS is 0.

the one with __WASI_ERRNO_NOPROTOOPT in socket() is
a user-visible bug.

tested with wamr-wasi-extensions/samples/socket-tcp-udp.

cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4474
2025-07-15 09:23:46 +02:00
2a952b371a wasi_socket_ext.c: fix the number of getaddrinfo results (#4466)
the case of zero results was especially broken.
2025-07-14 13:12:32 +08:00
b3158e643c Fix typos (#4472)
* leave api name unchanged so don't break API
2025-07-14 13:12:08 +08:00
c8f7a7fc1a fix regression running_config.json (#4477) 2025-07-14 13:08:58 +08:00
2c4a660c4c posix os_socket_addr_resolve: relax compatibility check (#4469)
some getaddrinfo implementations sometimes return results with
ai_protocol=0.

cf. https://github.com/apache/nuttx/issues/16693

standard-wise, i couldn't find anything about ai_protocol in
susv4-2018 except the following text:

> The fields ai_family, ai_socktype, and ai_protocol shall be usable
> as the arguments to the socket() function to create a socket suitable
> for use with the returned address.

because ai_protocol is usually merely used to feed socket() and
socket() usually accepts 0, it's probably standard-wise ok for
getaddrinfo to return ai_protocol=0.
the major implementations of getaddrinfo (eg. kame) seem to return
specific values like ai_protocol=IPPROTO_TCP though.

anyway, for the purpose of this function, there is little point to
be strict on the host getaddrinfo behavior. this commit just relaxes
the check to be friendly to those getaddrinfo implementations.
2025-07-14 13:06:40 +08:00
53feadc2b0 lib-socket: implement getsockopt(SOL_SOCKET,SO_TYPE) (#4458)
cf. https://github.com/bytecodealliance/wasm-micro-runtime/issues/4456
2025-07-14 13:06:33 +08:00
5d48cfdbc0 introduce wasm_runtime_instantiate_ex2 (#4444)
* introduce wasm_runtime_instantiate_ex2

at this point, just a slightly inefficiant functionality
equivalent of wasm_runtime_instantiate_ex.
however, unlike wasm_runtime_instantiate_ex, this one is designed
to be extendable without breaking the user-visible ABI.
because the definition of InstantiationArgs2 is not exposed to
users, we can safely add new members to it.

this commit also makes wasm_runtime_instantiate_ex a wrapper
of wasm_runtime_instantiate_ex2.

if this goes well, maybe it's a good idea to apply a similar
pattern to RuntimeInitArgs, LoadArgs, SharedHeapInitArgs, etc.
i started with InstantiationArgs just because i happen to have
a need to extend it for wasi-nn.

cf.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/4364
https://github.com/bytecodealliance/wasm-micro-runtime/issues/4331

* product-mini/platforms/posix: use wasm_runtime_instantiate_ex2
2025-07-14 13:06:23 +08:00
65d3ffa7a4 add validation for recursive type count in loader (#4440) 2025-07-14 13:06:08 +08:00
47c7c85ac2 Bump version to 2.4.0 (#4483) 2025-07-14 11:06:03 +08:00
17be90d8f0 posix os_socket_addr_resolve: return the consistent max_info_size (#4467)
return the same value for max_info_size regardless of addr_info_size.
2025-07-10 13:42:57 +08:00
9e92f5ebe1 fix a wamrc debug mode compile issue (#4470) 2025-07-10 08:29:31 +08:00
334b4f8cb5 Add readme for extended const (#4471) 2025-07-10 08:29:03 +08:00
56f87b7ee9 wasi-nn: do not pretend to support legacy abi in openvino and llamacpp (#4468)
as tested by core/iwasm/libraries/wasi-nn/test/test_tensorflow.c,
the legacy "wasi_nn" abi uses the number of fp32 for get_output.
because these backends don't implement the abi, bail out explicitly
in build time.

cf.
https://github.com/bytecodealliance/wasm-micro-runtime/issues/4376
2025-07-10 08:28:08 +08:00
933e49df18 appease a few compiler warnings (-Wstrict-prototypes) (#4465) 2025-07-10 08:28:00 +08:00
d6fc18e197 enable aux stack frame for aot compiler fuzz test (#4462) 2025-07-10 08:27:42 +08:00
cd4712d939 build(deps): Bump github/codeql-action from 3.29.1 to 3.29.2 (#4459)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3.29.1 to 3.29.2.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Commits](https://github.com/github/codeql-action/compare/v3.29.1...v3.29.2)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-version: 3.29.2
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-07-10 08:27:32 +08:00
903a5c1f8c improve logic of heap_type validation when ref.null (#4372)
* Follow-up to PR #4300: prevent potential overflow

PR #4300 introduced the rationale for validating heap_type.
This patch moves the validation before the computation of
type1 to prevent potential overflow.
2025-07-10 08:27:11 +08:00
fbd27e5e03 wasi_nn_llamacpp.c: explicitly reject unimplemented input index (#4446)
note: wasmedge seems to accept index 1 for metadata. we don't
implement it.
2025-07-09 10:35:46 +08:00
d3b0b5c066 Add security issue runbook (#4450)
This runbook provides step-by-step guidance on handling a security advisory
2025-07-08 09:26:45 +08:00
0eceed2ba9 wasi: avoid user-triggerable 0-sized allocations (#4452)
might fix https://github.com/bytecodealliance/wasm-micro-runtime/issues/4451
2025-07-08 09:25:50 +08:00
7d05dbc988 Support extended constant expressions (#4432)
* implement extended const expr (#4318)
* add a toggle to enable extended const on wamrc (#4412)
2025-07-07 13:34:02 +08:00
be33a40ba7 Fix socket shutdown (#12) (#4449) 2025-07-07 02:02:28 +08:00
8a55a1e7a1 Shared heap enhancements for Interpreter and AOT (#4400)
Propose two enhancements:

- Shared heap created from preallocated memory buffer: The user can create a shared heap from a pre-allocated buffer and see that memory region as one large chunk; there's no need to dynamically manage it(malloc/free). The user needs to make sure the native address and size of that memory region are valid.
- Introduce shared heap chain: The user can create a shared heap chain, from the wasm app point of view, it's still a continuous memory region in wasm app's point of view while in the native it can consist of multiple shared heaps (each of which is a continuous memory region). For example, one 500MB shared heap 1 and one 500 MB shared heap 2 form a chain, in Wasm's point of view, it's one 1GB shared heap.

After these enhancements, the data sharing between wasm apps, and between hosts can be more efficient and flexible. Admittedly shared heap management can be more complex for users, but it's similar to the zero-overhead principle. No overhead will be imposed for the users who don't use the shared heap enhancement or don't use the shared heap at all.
2025-07-04 10:44:51 +08:00
ee056d8076 wasi_nn_llamacpp.c: validate input tensor type/dimensions (#4442) 2025-07-03 10:17:19 +08:00
68d5ae10d4 docs: fix cmake variable typo (#4441) 2025-07-02 09:37:29 +08:00