Skip to content

Infinite recursion when generating debuginfo #144636

@tmiasko

Description

@tmiasko
use std::marker::PhantomData;

pub struct AB<T: 'static> {
    pub a: PhantomData<T>,
    pub b: *const AB<(T, T)>,
}

fn main() {
    std::hint::black_box(AB::<()> { a: PhantomData, b: std::ptr::null() });
}
$ rustc +7278554d82fa474a4e8b5c67afb009e11e41a841 -g a.rs
Terminated

It was reintroduced by #144407 to resolve a different issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-debuginfoArea: Debugging information in compiled programs (DWARF, PDB, etc.)C-bugCategory: This is a bug.I-crashIssue: The compiler crashes (SIGSEGV, SIGABRT, etc). Use I-ICE instead when the compiler panics.I-prioritizeIssue: Indicates that prioritization has been requested for this issue.S-has-bisectionStatus: A bisection has been found for this issueT-compilerRelevant to the compiler team, which will review and decide on the PR/issue.regression-from-stable-to-nightlyPerformance or correctness regression from stable to nightly.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions