Skip to content

Add OOM test for component ResourceAny::resource_drop_async#13051

Merged
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
fitzgen:oom-test-for-resource-drop-async
Apr 13, 2026
Merged

Add OOM test for component ResourceAny::resource_drop_async#13051
alexcrichton merged 1 commit into
bytecodealliance:mainfrom
fitzgen:oom-test-for-resource-drop-async

Conversation

@fitzgen

@fitzgen fitzgen commented Apr 11, 2026

Copy link
Copy Markdown
Member

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
@alexcrichton alexcrichton added this pull request to the merge queue Apr 13, 2026
Merged via the queue into bytecodealliance:main with commit b2fd5de Apr 13, 2026
48 checks passed
@fitzgen fitzgen deleted the oom-test-for-resource-drop-async branch April 13, 2026 19:07
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