Skip to content

Use our OOM-handling PrimaryMap in the wasmtime_environ::module_artifacts module#12623

Open
fitzgen wants to merge 8 commits intobytecodealliance:mainfrom
fitzgen:use-oom-handling-primary-map-in-environ-module-artifacts
Open

Use our OOM-handling PrimaryMap in the wasmtime_environ::module_artifacts module#12623
fitzgen wants to merge 8 commits intobytecodealliance:mainfrom
fitzgen:use-oom-handling-primary-map-in-environ-module-artifacts

Conversation

@fitzgen
Copy link
Member

@fitzgen fitzgen commented Feb 18, 2026

Depends on #12622 and its transitive PR deps.

And also make it so that cloning it doesn't actually require any allocations by
wrapping the inner `GcStructLayout` in an `Arc`.
I realized we need to adjust its `V: Clone` bound into `V: TryClone` which means
that we can no longer actually just wrap an inner
`cranelift_entity::SecondaryMap<K, V>` and need to instead implement our
own. This also made me realize that we need `remove` to be fallible because,
when the entry being removed is in bounds, it overwrites the entry with the
default value, but that default value needs to be `TryClone`d now which is, of
course, a fallible operation.
@fitzgen fitzgen requested review from a team as code owners February 18, 2026 21:06
@fitzgen fitzgen requested review from alexcrichton and removed request for a team February 18, 2026 21:06
@github-actions github-actions bot added cranelift Issues related to the Cranelift code generator fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:ref-types Issues related to reference types and GC in Wasmtime labels Feb 18, 2026
@github-actions
Copy link

Subscribe to Label Action

cc @fitzgen

Details This issue or pull request has been labeled: "cranelift", "fuzzing", "wasmtime:api", "wasmtime:ref-types"

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

  • fitzgen: fuzzing, wasmtime:ref-types

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

cranelift Issues related to the Cranelift code generator fuzzing Issues related to our fuzzing infrastructure wasmtime:api Related to the API of the `wasmtime` crate itself wasmtime:ref-types Issues related to reference types and GC in Wasmtime

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments