clang 23 is getting into an infinite loop compiling dovecot.
I can reproduce it here. The file is src/lib-json/test-json-generator.c at -O2. clang 22 compiles it in
about 2 seconds, with clang 23 I gave up waiting after half an hour, so it does look hung.
The time is going into one of the loop optimization passes in the code generator.
Turning that pass off gets dovecot building again. The whole recipe
went through fine here on qemux86-64 with TOOLCHAIN=clang and
CFLAGS:append:pn-dovecot = " -mllvm -disable-lsr"
in local.conf. The option just disables the pass, so it should behave the same on other targets.
The affected file is only one of dovecot's own test binaries, nothing that gets shipped.
I am reducing a testcase and will report it to llvm, will post the link here.
If a fix lands I will request a release/23.x backport.
Thanks,
Sunil Dora