Skip to content

Add OOM test for component InstancePre::instantiate_async#12993

Open
fitzgen wants to merge 1 commit intobytecodealliance:mainfrom
fitzgen:handle-oom-in-component-instance-pre-instantiate-async
Open

Add OOM test for component InstancePre::instantiate_async#12993
fitzgen wants to merge 1 commit intobytecodealliance:mainfrom
fitzgen:handle-oom-in-component-instance-pre-instantiate-async

Conversation

@fitzgen
Copy link
Copy Markdown
Member

@fitzgen fitzgen commented Apr 8, 2026

Fix infallible allocations in the component model instantiation path:

  • Use TryPrimaryMap for instance_states and instances in ComponentInstance
  • Use TryPrimaryMap for instances in ComponentStoreData
  • Use TryVec for scopes in ComponentTasksNotConcurrent
  • Use TryPrimaryMap for guest field in ResourceTables
  • Use try_new for Arc and Box allocations in instantiation/call paths
  • Make push_component_instance and push_instance_id return Result
  • Make enter_call_not_concurrent return Result

Fix infallible allocations in the component model instantiation path:

- Use TryPrimaryMap for instance_states and instances in ComponentInstance
- Use TryPrimaryMap for instances in ComponentStoreData
- Use TryVec for scopes in ComponentTasksNotConcurrent
- Use TryPrimaryMap for guest field in ResourceTables
- Use try_new for Arc and Box allocations in instantiation/call paths
- Make push_component_instance and push_instance_id return Result
- Make enter_call_not_concurrent return Result
@fitzgen fitzgen requested review from a team as code owners April 8, 2026 22:40
@fitzgen fitzgen requested review from alexcrichton and removed request for a team April 8, 2026 22:40
@github-actions github-actions bot added fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself labels Apr 9, 2026
@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 9, 2026

Subscribe to Label Action

cc @fitzgen

Details This issue or pull request has been labeled: "fuzzing", "wasmtime:api"

Thus the following users have been cc'd because of the following labels:

  • fitzgen: fuzzing

To subscribe or unsubscribe from this label, edit the .github/subscribe-to-label.json configuration file.

Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants