alexcrichton opened issue #14812:
Right now the semantics of
map<K, V>mean that if duplicate keys are supplied then the last-specified key is the one present in the map. This is generally fine but this means that Wasmtime does not provide embedders the means to correctly operate with maps-of-handles because the embedder can't ever properly deallocate the handles it was given. For example if the host is given twoownhandles it'll only actually receive one of them, meaning the other effectively leaks.
alexcrichton added the wasm-proposal:component-model-map label to Issue #14812.
alexcrichton commented on issue #14812:
I've created an upstream issue to possibly close this by making
map<K, V>with handles an invalid component.
Last updated: Oct 31 2026 at 23:03 UTC