fitzgen opened PR #14116 from fitzgen:alias-regions-for-component-model-flags to bytecodealliance:main:
These flags were imported by adapters and accessed with the
PublicGlobalalias
region, but this led to ambiguity between loads and stores to different
flags. The flags are stored in theVMComponentContextand we generally know
when we are importing flags as globals unambiguously, so do the same thing we do
to get precise alias regions for defined globals for component-model flags, but
use theAliasRegionKey::Vm { ty: VMComponentContext, .. }alias region.A final wrinkle: core Wasm does not have the enclosing
VMComponentContext's
offsets on hand, so we movetask_may_blockahead ofmay_leaveso both flags
are before every component-shape-dependent field and the flags' offsets are a
function of the pointer size alone.Depends on https://github.com/bytecodealliance/wasmtime/pull/14115
fitzgen requested wasmtime-compiler-reviewers for a review on PR #14116.
fitzgen requested alexcrichton for a review on PR #14116.
fitzgen requested wasmtime-core-reviewers for a review on PR #14116.
github-actions[bot] added the label cranelift on PR #14116.
github-actions[bot] added the label cranelift:area:machinst on PR #14116.
:thumbs_up: alexcrichton submitted PR review.
fitzgen updated PR #14116.
fitzgen commented on PR #14116:
@alexcrichton mind taking another look? when rebasing this, it went across the vmctx macro stuff, so I added another commit that makes it avoid defining new
AliasRegionshelpers incrates/craneliftand instead use macro-generated helpers, but this required some minor surgery to the macro to support accessing fields that are dynamic based on the target pointer size, but not the fullVMOffsets.
:thumbs_up: alexcrichton submitted PR review.
fitzgen added PR #14116 Access component-model flags via their VmType alias region in adapters to the merge queue.
:check: fitzgen merged PR #14116.
fitzgen removed PR #14116 Access component-model flags via their VmType alias region in adapters from the merge queue.
Last updated: Aug 30 2026 at 09:07 UTC