Skip to content

Comments

Fix determinism bug in type name updating#8359

Open
tlively wants to merge 1 commit intomainfrom
map-type-names-determinism-fix
Open

Fix determinism bug in type name updating#8359
tlively wants to merge 1 commit intomainfrom
map-type-names-determinism-fix

Conversation

@tlively
Copy link
Member

@tlively tlively commented Feb 21, 2026

There was previously a determinism bug where the result of updating type
names could depend on the iteration order of the oldToNewTypes map. The
bug occurred when the new types were a shuffling of the old types. The
update loop updated the module's type names in-place for the new types,
and those in-place updates could affect later results if the updated new
types were later visited as old types.

Fix the bug by collecting all changes to apply before applying them to the module's types and indices. This does not affect any existing tests,
but it will unbreak CI for #8217.

There was previously a determinism bug where the result of updating type
names could depend on the iteration order of the oldToNewTypes map. The
bug occurred when the new types were a shuffling of the old types. The
update loop updated the module's type names in-place for the new types,
and those in-place updates could affect later results if the updated new
types were later visited as old types.

Fix the bug by collecting all changes to apply before applying them to the module's types and indices. This does not affect any existing tests,
but it will unbreak CI for #8217.
@tlively tlively requested a review from kripken February 21, 2026 03:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant