Stream: git-wasmtime

Topic: wasmtime / issue #12113 Do not return `Tombstone` in `Res...


view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2025 at 14:18):

tomasol opened issue #12113:

Steps to Reproduce

Current ResourceTable::iter_mut does not filter out deleted resources, and forces following pattern:

for join_set in self.resource_table.iter_mut() {
    let Some(join_set) = join_set.downcast_ref::<JoinSetResource>() else {
        // Must be `Tombstone`:
        continue;
    };
        ...

Expected Results

iter_mut should not return Tombstone values. This change would make it consistent with other functions like is_empty and Debug output.

Actual Results

Tombstone is returned, forcing to skip unknown resource types, which can lead to bugs.

Versions and Environment

Wasmtime 39.0.1

Extra Info

This happens only in debug mode, as Tombstones are not used when debug assertions are disabled.
I can make the PR if this issue is confirmed.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2025 at 14:18):

tomasol added the bug label to Issue #12113.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2025 at 16:08):

alexcrichton commented on issue #12113:

Thanks for the report! Related, but somewhat orthogonal as well, I've sent https://github.com/bytecodealliance/wasmtime/pull/12114 to disable Tombstone in debug builds since while that was useful for development I don't think we want it on-by-default. Regardless though if you'd like to send a PR to fix the iterator behavior that also sounds good!

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2025 at 17:18):

tomasol closed issue #12113:

Steps to Reproduce

Current ResourceTable::iter_mut does not filter out deleted resources, and forces following pattern:

for join_set in self.resource_table.iter_mut() {
    let Some(join_set) = join_set.downcast_ref::<JoinSetResource>() else {
        // Must be `Tombstone`:
        continue;
    };
        ...

Expected Results

iter_mut should not return Tombstone values. This change would make it consistent with other functions like is_empty and Debug output.

Actual Results

Tombstone is returned, forcing to skip unknown resource types, which can lead to bugs.

Versions and Environment

Wasmtime 39.0.1

Extra Info

This happens only in debug mode, as Tombstones are not used when debug assertions are disabled.
I can make the PR if this issue is confirmed.

view this post on Zulip Wasmtime GitHub notifications bot (Dec 03 2025 at 17:18):

tomasol commented on issue #12113:

Thanks for the quick response, I think the filter is no longer needed.


Last updated: Dec 06 2025 at 06:05 UTC