tomasol opened issue #12113:
Steps to Reproduce
Current
ResourceTable::iter_mutdoes 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_mutshould not returnTombstonevalues. This change would make it consistent with other functions likeis_emptyandDebugoutput.Actual Results
Tombstoneis 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.
tomasol added the bug label to Issue #12113.
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
Tombstonein 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!
tomasol closed issue #12113:
Steps to Reproduce
Current
ResourceTable::iter_mutdoes 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_mutshould not returnTombstonevalues. This change would make it consistent with other functions likeis_emptyandDebugoutput.Actual Results
Tombstoneis 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.
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