[integration] static fast-interpreter/P2 component profile + multi-module hardening#9
Draft
matthargett wants to merge 2676 commits into
Draft
[integration] static fast-interpreter/P2 component profile + multi-module hardening#9matthargett wants to merge 2676 commits into
matthargett wants to merge 2676 commits into
Conversation
…codealliance#4690) * feat: add support for checking unsupported build configurations * docs: improve clarity and formatting in build_wamr.md * feat: add check for unsupported SHARED_HEAP + FAST_JIT configuration and update documentation warning * feat: disable default SIMD setting for 64-bit platform in CMake configuration * feat: update Android and macOS workflows to handle SIMD support in classic interp mode * feat: update SGX compilation workflow to handle unsupported FAST_JIT and classic interp mode without SIMD support * feat: enhance check for unsupported CLASSIC_INTERP configurations * feat: disable fast interpreter for shared heap tests and update unsupported features test library * feat: enhance unsupported combination checks and update build configurations for JIT and SIMD * In regression tests, use llvm-jit and fast-jit to replace multi-tier-jit + running mode. Multi-tier-jit contains both fast-jit and llvm-jit. Fast-jit doesn't support SIMD, but llvm-jit does. So, should multi-tier-jit support SIMD? My answer is NO. - The regular form of multi-tier-jit uses fast-jit as tier1 and llvm-jit as tier2. Therefore, if fast-jit doesn't support SIMD, the entire multi-tier doesn't support SIMD either. - `--fast-jit` and `--llvm-jit` of multi-tier-jit should adhere to the global limitations of multi-tier-jit. * Explicitly specify SIMD, MULTI_MODULE, and their unsupported running modes. - SIMD and Ref. types are enabled by default on linux and darwin. So remove duplicate feature testing from CI - Apply new configuration for wasm-c-api compilation commands
…nce#4738) Bumps [actions/checkout](https://github.com/actions/checkout) from 5.0.1 to 6.0.0. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](actions/checkout@v5.0.1...v6) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.0 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>
…ealliance#4739) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.5 to 4.31.6. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v4.31.5...v4.31.6) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.31.6 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>
…nce#4747) Bumps [actions/checkout](https://github.com/actions/checkout) from 6.0.0 to 6.0.1. - [Release notes](https://github.com/actions/checkout/releases) - [Commits](actions/checkout@v6...v6.0.1) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: 6.0.1 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>
…ealliance#4746) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.6 to 4.31.7. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v4.31.6...v4.31.7) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.31.7 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>
…odealliance#4745) Signed-off-by: zhenweijin <zhenwei.jin@intel.com>
* add new runtime api for reset shared heap(chain) * add new unit test case
…ealliance#4757) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.7 to 4.31.8. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v4.31.7...v4.31.8) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.31.8 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>
Bumps [actions/cache](https://github.com/actions/cache) from 4 to 5. - [Release notes](https://github.com/actions/cache/releases) - [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md) - [Commits](actions/cache@v4...v5) --- updated-dependencies: - dependency-name: actions/cache dependency-version: '5' 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>
…dealliance#4756) Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 5.0.0 to 6.0.0. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v5...v6) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: 6.0.0 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>
Co-authored-by: ai-assistant
* Ensure --addr-pool mask accepts numbers only * Add mask validation * Replace mask assignment position * Use a thread-safe function and free allocated memory Co-authored-by: liang.he <liang.he@intel.com>
…ealliance#4767) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.8 to 4.31.9. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v4.31.8...v4.31.9) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.31.9 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>
* fix: update macOS workflow configurations to use macos-15 and macos-15-intel * fix: remove unsupported build options for macOS workflows
Signed-off-by: Huang Qi <huangqi3@xiaomi.com>
* fix: Wrong compiler parameter on MSVC * refactor: Move gcc flags to common build script. * refactor: Add both C/CXX flags
The goal is to keep the devcontainer image minimal and its build time as fast as possible. - Remove all rarely used tools. - Change the base image to the latest template. - Synchronize the WASI-SDK and WABT versions with those used by the CI. Add libzstd for LLVM linking
…tecodealliance#4750) * docs: update tiered support documentation with detailed tier definitions and feature classifications and improved compilation flags and links for clarity * update tiered support documentation to clarify feature support levels and enhance readability - Revised descriptions for Tier A to specify that features have been used in products. - Reformatted notes on testing, maintenance, and support definitions for better clarity. - Added a new section for privileged features with detailed explanations. - Updated tables for Tier A, Tier B, and Tier C to include additional targets and compilation flags.
* fix: clear exec_env_tls when destroying exec_env When an exec_env is destroyed, check if it matches the current thread's exec_env_tls and clear it to avoid dangling pointer issues. Without this fix, in daemon-style execution where the same thread runs multiple WASM modules sequentially (like Cloudflare Workers), the exec_env_tls can point to freed memory after an exec_env is destroyed, causing crashes on subsequent executions when the signal handler tries to access it. This is critical for AOT mode with hardware bounds checking enabled, where signal handlers rely on exec_env_tls to handle SIGSEGV properly. * test(exec_env): add reproducer for exec_env_tls dangling pointer bug Add test case that reproduces the bug where exec_env_tls is not cleared on early return paths in invoke_native_with_hw_bound_check. The test triggers native stack overflow check failure, which causes wasm_runtime_call_wasm to return early after setting exec_env_tls but without clearing it. This leaves exec_env_tls pointing to a destroyed exec_env, causing subsequent calls to fail with "invalid exec env". Test confirms the fix in wasm_exec_env_destroy correctly clears exec_env_tls when destroying the exec_env it points to. * fix(runtime): clear exec_env_tls on early return from stack overflow check Move the fix to clear exec_env_tls at the source - in the early return path of invoke_native_with_hw_bound_check when native stack overflow check fails.
* fix(aot): reserve x18 register on macOS ARM64 Apple reserves CPU register x18 for TLS on ARM64. When generating AOT code for aarch64 on macOS, LLVM may use x18, causing crashes when the AOT code runs on macOS ARM64 (M1/M2/M3). This patch: 1. Detects darwin/macho ABI and sets correct vendor string 2. Detects darwin/apple in default triple for platform detection 3. Adds +reserve-x18 to LLVM target features for aarch64 on macOS The fix only applies when compiling on macOS ARM64 hosts, ensuring generated AOT code is compatible with Apple's platform requirements. * test(aot): add x18 register reservation test for macOS ARM64 Add a standalone test to verify that the +reserve-x18 LLVM flag is correctly applied when compiling AOT for macOS ARM64. On macOS ARM64, x18 is reserved by Apple for TLS (Thread Local Storage). Without the +reserve-x18 flag, LLVM may generate code that uses x18, causing random SIGSEGV crashes (~80% crash rate in testing). The test: - Creates a WASM module with 24 local variables to stress register allocation - Compiles to AOT with -O3 optimization (which would use x18 without the fix) - Runs 1000 iterations to verify no crashes occur - Only runs on macOS ARM64 (skipped on other platforms) Test results: - Without fix: 82/100 crash rate - With fix: 0/100 crash rate (1000 iterations verified)
…#4788) correct boundary check in check_dynamic_offset_pop when dynamic_offset is 0. When dynamic_offset = 0, check_dynamic_offset_pop will always return true, which may wrongly update dynamic_offset. also include a typo fix in SET_OPERAND_REF Signed-off-by: zhenweijin <zhenwei.jin@intel.com>
Signed-off-by: zhenweijin <zhenwei.jin@intel.com>
…dealliance#4794) Bumps [github/codeql-action](https://github.com/github/codeql-action) from 4.31.9 to 4.31.10. - [Release notes](https://github.com/github/codeql-action/releases) - [Commits](github/codeql-action@v4.31.9...v4.31.10) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: 4.31.10 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>
| elems[i] = wit_resource_ctor(reps[i]); | ||
| if (!elems[i]) { | ||
| while (i > 0) { | ||
| free_wit_value(elems[--i]); |
matthargett
force-pushed
the
integration/cm-wasip2-all
branch
from
July 11, 2026 08:43
2227ab6 to
dc9a27d
Compare
matthargett
marked this pull request as draft
July 11, 2026 11:48
| raw_cx.borrow_scope_type = BORROW_SCOPE_NONE; | ||
| raw_cx.borrow_scope.task = NULL; | ||
| exec_env->memory = raw_memory; | ||
| exec_env->cx = &raw_cx; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
This is the WAMR integration line for the statically linked snqr Apple host. The target guest format is component-model
wasm32-wasip2on the stable WASI Preview 20.2.6package set.Existing core-Wasm guests and their raw import aliases remain available only for parity validation while canonical component bindings are adopted. Those legacy guests are not described as components.
Static Apple product profile
The checked profile builds a single full-LTO static archive with:
All product host interfaces and component dependencies are statically linked. Dynamically loaded components remain forbidden.
MULTI_MODULE=1is retained solely for existing core-Wasm compatibility guests and their helper modules during the parity sweep; it is not a component plug-in system.Because the shipping profile enables the core-module registry for those legacy helpers, the ownership hardening is part of the product contract: the registry owns copied names, module-reader buffers remain runtime-owned until safe destruction, callers have an explicit unregister/ownership transfer, and component-owned embedded core modules are immediately removed from the global registry.
Host-owned execution threads remain supported through the thread manager. Guest shared memory, guest pthreads, and WASI threads remain disabled. This permits the main component interpreter and separately started/stopped WebAudio worker or audio-node execution contexts without introducing dynamically loadable WASI components.
Integrated component and Preview 2 work
0.2.6package version and accept compatible patch-level imports in the correct direction.Focused Airbus-lineage changes remain split for review in airbus-forks#10 through bytecodealliance#17. The current-upstream registry lifetime stack is staged separately in
review/multi-module-unregister-unloadfor upstream triage.Local product proof
Final head:
f0c9b78d8cd11ad52b586f0cdfafc330c0d83396.dev/cm_wasip2_completebase was merged without changing the tested integration tree, preserving every focused commit.wasm32-wasip2command component ran withhost=0 guest=0on the local Mac and a physical iPhone XS.MULTI_MODULE=1.CI policy for this update
The product batch was pushed only after the local component, sanitizer, static-analysis, LTO, Mac, and physical-device proof was green. One merge-only update resolved the current base conflict after the same parser, execution, and Apple archive checks passed on the merge head.
The first automatic matrix exposed two integration-specific unit failures: the multi-module ownership change had made
wasm_runtime_unload(NULL)unsafe, and seven older checked-in Rust test binaries actually require WASI 0.2.9. The null path is a no-op again with a direct regression test; the newer binaries are now honest negative compatibility cases without weakening the 0.2.6 ceiling. Both fixes were locally validated and pushed together once. The null guard is also staged for current-upstream review onfix/null-module-unload, and the Airbus-lineage compatibility/error-reporting changes are included in airbus-forks#17.A separate NuttX failure was hosted-runner disk exhaustion during checkout; configure and build never ran, the identical matrix slot was green previously, and no source workaround was added. No full hosted workflow was manually dispatched or re-run.
Final hosted result
The final automatic batch completed successfully without a manual dispatch or rerun: 11/11 workflows passed, representing 504/504 successful check records (470/470 distinct displayed check names). There are no failed, cancelled, skipped, queued, or pending checks on
f0c9b78d8cd11ad52b586f0cdfafc330c0d83396.