Skip to content

ICE: stack overflow in self-referential struct in clippy_utils::ty::is_normalizable_helper #10508

Closed
@matthiaskrgr

Description

@matthiaskrgr

Summary

clippy-driver file.rs is enough.

use std::marker::PhantomData;

struct Node<T: 'static> {
    m: PhantomData<&'static T>,
}

struct Digit<T> {
    elem: T,
}

enum FingerTree<T: 'static> {
    Single(T),

    Deep(Digit<T>, Box<FingerTree<Node<T>>>),
}

fn main() {}

Version

rustc 1.70.0-nightly (171693274 2023-03-14)
binary: rustc
commit-hash: 1716932743a7b3705cbf0c34db0c4e070ed1930d
commit-date: 2023-03-14
host: x86_64-unknown-linux-gnu
release: 1.70.0-nightly
LLVM version: 15.0.7

Error output

Backtrace

0x0000555555c54817 in clippy_utils::ty::is_normalizable_helper ()
(gdb) bt
#0  0x0000555555c54817 in clippy_utils::ty::is_normalizable_helper ()
#1  0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#2  0x0000555555c54c79 in clippy_utils::ty::is_normalizable_helper ()
#3  0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#4  0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#5  0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#6  0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#7  0x0000555555c54c79 in clippy_utils::ty::is_normalizable_helper ()
#8  0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#9  0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#10 0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#11 0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#12 0x0000555555c54c79 in clippy_utils::ty::is_normalizable_helper ()
#13 0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#14 0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#15 0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#16 0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()
#17 0x0000555555c54c79 in clippy_utils::ty::is_normalizable_helper ()
#18 0x0000555555c54b29 in clippy_utils::ty::is_normalizable_helper ()

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Clippy is not doing the correct thingI-ICEIssue: Clippy panicked, giving an Internal Compilation Error (ICE) ❄️

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions