Skip to content

regression: hang with -Zsave-analysis #101505

Closed
@matthiaskrgr

Description

@matthiaskrgr

Code

I tried this code:

fn next_letter_position(&self, x_index: f32, y_index: f32, width: f32) -> (f32, f32) {
    let vwidth = &self.viewport.x / 2.0;

    match x_index * width {
        0.0 ... vwidth => {
            (x_index + 1.0, y_index)
        },
        _ => (0.0, y_index - 1.0)
    }
}

with rustc rustc 1.65.0-nightly (c07a8b4e0 2022-08-26) this runs in a couple ms:
rustc ./a.rs --crate-type=lib -Zsave-analysis -Ztime=yes -Ztime-passes=yes

with rustc rustc 1.65.0-nightly (3c7278846 2022-09-06) this seems to hang somewhere in save-analysis

  26,77%  librustc_driver-0f3b2583c1b011ce.so  [.] <rustc_middle::hir::map::Map>::get
  24,00%  librustc_driver-0f3b2583c1b011ce.so  [.] <rustc_middle::hir::map::Map>::get_parent_node
   5,76%  librustc_driver-0f3b2583c1b011ce.so  [.] <rustc_save_analysis::SaveContext>::get_path_res

( I killed the process after waiting for 5 minutes 🙃 )

Metadata

Metadata

Assignees

Labels

A-save-analysisArea: saving results of analyses such as inference and borrowck results to a file.C-bugCategory: This is a bug.S-has-mcveStatus: A Minimal Complete and Verifiable Example has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-untriagedUntriaged performance or correctness regression.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions