Issue |
151451
|
Summary |
[Clang] Clang hangs when compiling valid code involving std::thread and lambda with `--std=c++23`
|
Labels |
clang
|
Assignees |
|
Reporter |
Xniao
|
Clang trunk hangs when compiling following program under C++23 mode. The same code compiles successfully and quickly with `--std=c++20`.
## Program
```cpp
#include <thread>
int main() {
std::thread memory_thread([]() {
const int alloc_size = 1024 * 1024;
while (true) {
char *buffer = new char[alloc_size];
if (buffer == nullptr)
break;
delete[] buffer;
}
});
return 0;
}
```
Here is the repro: https://godbolt.org/z/4v1c5Wreq
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs