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
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.