Hacktoberfest 2026: the issues maintainers tagged for October, open and beginner-friendly. Browse Hacktoberfest issues

Specifying lockdown behavior

Open
#727 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Active
Tech stack
javascript, wasm
Domain
api, compilers

Research direction

Start with the component invariants section of design/mvp/Explainer.md and CanonicalABI.md, then review JS-API issue #686 and the removal in #705. Determine where lockdown semantics and failures during ToComponentValue and lowering should be specified; done means the location and behavior are agreed and the relevant specification is updated.

Written by the indexing model from the issue text.

Description

Component invariants state:

Components define a "lockdown" state that prevents continued execution after a trap. This both prevents continued execution with corrupt state and also allows more-aggressive compiler optimizations (e.g., store reordering). This was considered early in Core WebAssembly standardization but rejected due to the lack of clear trapping boundary. With components, each component instance is given a mutable "lockdown" state that is set upon trap and implicitly checked at every execution step by component functions. Thus, after a trap, it's no longer possible to observe the internal state of a component instance.

I don't see anything in CanonicalABI.md about this, does this still need to be specified? There was a may_enter flag that was removed in #705.

I'm asking because the JS-API (#686) needs to care about lockdown semantics, and I wasn't sure if it should define it in the JS-API or in CanonicalABI.md.

For the JS-API, it'd be great to fuse the destructuring of JS values (ToComponentValue) with the lowering of the component value into linear memory. However, destructuring a JS value can fail (type mismatches) and also lowering the component value can fail (OOBs). So ideally we could have both kinds of failures lead to a lockdown of the component such that it's not observable what happened to the internal wasm state.

If this is just missing, I can add it to CanonicalABI.md, I think that's the right place for it.

Dominant language
WebAssembly
Stars
1.4k
Forks
130
Avg merge
2d 23h
Merged PRs (30d)
14

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from WebAssembly/component-model

All issues in WebAssembly/component-model

Similar issues

More Backend & API Design issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.