Stream: git-wasmtime

Topic: wasmtime / PR #12480 fix: ensure EntitySet::insert reserv...


view this post on Zulip Wasmtime GitHub notifications bot (Jan 30 2026 at 09:02):

lisenokdonbassenok opened PR #12480 from lisenokdonbassenok:fix/entity-set-insert-capacity to bytecodealliance:main:

Cause: wasmtime_environ::collections::EntitySet::insert called try_ensure_capacity(k.index()), while CompoundBitSet::try_ensure_capacity guarantees capacity only for indices < n. This could leave the backing bitset without space for k.index() and force a later infallible ensure_capacity inside insert, breaking the fallible-allocation contract and potentially panicking on OOM.
Summary: Update EntitySet::insert to reserve capacity for indices 0..=k.index() by calling try_ensure_capacity(k.index() + 1) so that all allocations during insertion go through the fallible path and correctly report OutOfMemory instead of panicking.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 30 2026 at 09:02):

lisenokdonbassenok requested pchickey for a review on PR #12480.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 30 2026 at 09:02):

lisenokdonbassenok requested wasmtime-core-reviewers for a review on PR #12480.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 30 2026 at 17:33):

pchickey unassigned pchickey from PR #12480 fix: ensure EntitySet::insert reserves correct capacity.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 30 2026 at 17:33):

pchickey requested fitzgen for a review on PR #12480.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 30 2026 at 19:51):

alexcrichton commented on PR #12480:

Thanks! Could you add a test for this in this file? Ideally that'd be verified to fail before this PR but then pass after this PR

view this post on Zulip Wasmtime GitHub notifications bot (Feb 01 2026 at 14:46):

lisenokdonbassenok requested wasmtime-fuzz-reviewers for a review on PR #12480.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 01 2026 at 14:46):

lisenokdonbassenok updated PR #12480.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 01 2026 at 14:46):

lisenokdonbassenok commented on PR #12480:

Thanks! Could you add a test for this in this file? Ideally that'd be verified to fail before this PR but then pass after this PR

Added test

view this post on Zulip Wasmtime GitHub notifications bot (Feb 01 2026 at 15:48):

github-actions[bot] added the label fuzzing on PR #12480.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 01 2026 at 15:49):

github-actions[bot] commented on PR #12480:

Subscribe to Label Action

cc @fitzgen

<details>
This issue or pull request has been labeled: "fuzzing"

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

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

Learn more.
</details>

view this post on Zulip Wasmtime GitHub notifications bot (Feb 02 2026 at 04:27):

alexcrichton submitted PR review.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 02 2026 at 04:27):

alexcrichton added PR #12480 fix: ensure EntitySet::insert reserves correct capacity to the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 02 2026 at 04:50):

alexcrichton merged PR #12480.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 02 2026 at 04:50):

alexcrichton removed PR #12480 fix: ensure EntitySet::insert reserves correct capacity from the merge queue.

view this post on Zulip Wasmtime GitHub notifications bot (Feb 02 2026 at 18:17):

fitzgen commented on PR #12480:

Thanks!


Last updated: Feb 24 2026 at 04:36 UTC