Skip to content

Unlimited recursion in clang makes the machine unusable. #108716

@Abramo-Bagnara

Description

@Abramo-Bagnara

I've restricted the testcase to the tiny source below that is still able to make clang consume all the memory and make the machine unusable. I've stopped the run for this reason.

abramo@hp:~/bugs$ cat bug1.cc
struct c {
  c &a = *new c;
  c() {}
} aobj;
abramo@hp:~/bugs$ clang++-18 -c bug1.cc 
bug1.cc:2:11: warning: stack nearly exhausted; compilation time may suffer, and crashes due to stack overflow are likely [-Wstack-exhausted]
    2 |   c &a = *new c;
      |           ^
^C

Metadata

Metadata

Assignees

No one assigned

    Labels

    clangClang issues not falling into any other category

    Type

    No type

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions