Stream: git-wasmtime

Topic: wasmtime / issue #14812 Duplicate keys in `map<K, V>` lea...


view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 15:46):

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 two own handles it'll only actually receive one of them, meaning the other effectively leaks.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 19 2026 at 15:46):

alexcrichton added the wasm-proposal:component-model-map label to Issue #14812.

view this post on Zulip Wasmtime GitHub notifications bot (Oct 22 2026 at 16:29):

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.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 02 2026 at 20:34):

jrandolf commented on issue #14812:

I think the full issue isn't resolved, but the restriction has been added. Does this issue still block release of maps or can we say this issue is non-blocking now with the restriction? We can keep the issue open since it might be worth discussing later.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 02 2026 at 23:11):

alexcrichton closed 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 two own handles it'll only actually receive one of them, meaning the other effectively leaks.

view this post on Zulip Wasmtime GitHub notifications bot (Nov 02 2026 at 23:11):

alexcrichton commented on issue #14812:

I'll close this since I believe with the upstream issue and wasmparser update this is a non-issue now.


Last updated: Nov 19 2026 at 20:05 UTC