Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

coverage: Avoid a query stability hazard in function_coverage_map #119514

Merged
merged 1 commit into from
Jan 3, 2024

Commits on Jan 2, 2024

  1. coverage: Avoid a query stability hazard in function_coverage_map

    When rust-lang#118865 started enforcing the `rustc::potential_query_instability` lint in
    `rustc_codegen_llvm`, it added an exemption for this site, arguing that the
    entries are only used to create a list of filenames that is later sorted.
    
    However, the list of entries also gets traversed when creating the function
    coverage records in LLVM IR, which may be sensitive to hash-based ordering.
    
    This patch therefore changes `function_coverage_map` to use `FxIndexMap`, which
    should avoid hash-based instability by iterating in insertion order.
    Zalathar committed Jan 2, 2024
    Configuration menu
    Copy the full SHA
    5e7c1b9 View commit details
    Browse the repository at this point in the history