Skip to content

issue-93775 test overflows stack with debug assertions enabled #133432

Closed
@beepster4096

Description

@beepster4096

When debug-assertions=true is in config.toml, the test tests\ui\associated-consts\issue-93775.rs fails with a stack overflow. I think it stems from here in rustc_const_eval::const_eval::eval_queries::eval_to_allocation_raw_provider:

    if cfg!(debug_assertions) {
        // Make sure we format the instance even if we do not print it.
        // This serves as a regression test against an ICE on printing.
        // The next two lines concatenated contain some discussion:
        // https://rust-lang.zulipchat.com/#narrow/stream/146212-t-compiler.2Fconst-eval/
        // subject/anon_const_instance_printing/near/135980032
        let instance = with_no_trimmed_paths!(key.value.instance.to_string());
        trace!("const eval: {:?} ({})", key, instance);
    }

I tested this on x86_64-pc-windows-msvc, unsure if it happens on other platforms.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-testsuiteArea: The testsuite used to check the correctness of rustcC-bugCategory: This is a bug.O-windows-msvcToolchain: MSVC, Operating system: WindowsT-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