Skip to content

Drop flag statement creation depends on FxHashMap interation order #91943

Closed

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

  1. added
    T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.
    on Dec 15, 2021
  2. camelid commented on Dec 15, 2021

    @camelid
    Member

    Perhaps it should just use BTreeMap instead?

  3. added
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Feb 1, 2022
  4. apiraino commented on Apr 19, 2023

    @apiraino
    Contributor

    Revisiting this issue to evaluate the priority.

    @pnkfelix unsure about the status and global direction of this issue. Do we have some work in progress somewhere? I've tried following the breadcrumbs and landed on #102698. Unsure if it helps and - if yes - how much does that pull request covers to fix this issue.

    opinions? thanks :)

  5. removed
    I-prioritizeIssue needs a team member to assess the impact. Will be replaced by P-{low,medium,high,critical}
    on Apr 27, 2023
  6. added a commit that references this issue on Apr 29, 2023
  7. added a commit that references this issue on Apr 29, 2023
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