Skip to content

Drop flag statement creation depends on FxHashMap interation order #91943

Description

@Aaron1011

This code creates MIR statements based on an FxHashMap iteration order:

for flag in self.drop_flags.values() {
self.patch.add_assign(loc, Place::from(*flag), false_.clone());
}

drop_flags is defined as:

drop_flags: FxHashMap<MovePathIndex, Local>,

Since FxHashMap's fixed seed is different between 32 and 64 bit platforms, we may end up creating statements in a different order on 32-bit vs 64-bit hosts (the target platform passed to the compiler has no effect).

We should probably sort by MovePathIndex before creating the statements.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: This is a bug.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions