Skip to content

Add OOM test for component ResourceAny::resource_drop_async#13051

Open
fitzgen wants to merge 1 commit intobytecodealliance:mainfrom
fitzgen:oom-test-for-resource-drop-async
Open

Add OOM test for component ResourceAny::resource_drop_async#13051
fitzgen wants to merge 1 commit intobytecodealliance:mainfrom
fitzgen:oom-test-for-resource-drop-async

Conversation

@fitzgen
Copy link
Copy Markdown
Member

@fitzgen fitzgen commented Apr 11, 2026

Convert several infallible allocations to fallible alternatives:

  • HandleTable::slots: Vec -> TryVec
  • HostResourceData::table_slot_metadata: Vec -> TryVec
  • Resource type tracking: PrimaryMap<ResourceIndex, ResourceType> ->
    TryPrimaryMap across vm/component.rs, instance.rs, matching.rs,
    types.rs, component.rs, and linker.rs
  • Backtrace trace_through_continuations: remove Vec::collect() calls, iterate directly to avoid allocation
  • catch_traps: Box::new(Trap) -> try_new::<Box<_>>(Trap)

Convert several infallible allocations to fallible alternatives:
- HandleTable::slots: Vec<Slot> -> TryVec<Slot>
- HostResourceData::table_slot_metadata: Vec<TableSlot> -> TryVec<TableSlot>
- Resource type tracking: PrimaryMap<ResourceIndex, ResourceType> ->
  TryPrimaryMap across vm/component.rs, instance.rs, matching.rs,
  types.rs, component.rs, and linker.rs
- Backtrace trace_through_continuations: remove Vec::collect() calls,
  iterate directly to avoid allocation
- catch_traps: Box::new(Trap) -> try_new::<Box<_>>(Trap)
@fitzgen fitzgen requested review from a team as code owners April 11, 2026 00:48
@fitzgen fitzgen requested review from alexcrichton and removed request for a team April 11, 2026 00:48
@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 11, 2026
@github-actions
Copy link
Copy Markdown

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.

@alexcrichton alexcrichton added this pull request to the merge queue Apr 11, 2026
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Apr 11, 2026
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