llvm / llvm/llvm-project

[Clang] SIGSEGV ICE with lambda init-capture pack

Open
#213,524 4 comments 0 reactions 0 assignees View on GitHub
clang:frontend confirmed crash generated by fuzzer lambda regression:17
Dominant language
LLVM
Stars
40.5k
Forks
18.7k
PR merge metrics
PR metrics pending

Description

https://godbolt.org/z/j5nbG4Mdd
```cxx
template struct V {};
void init_capture_pack() {
auto L = [](auto... z) {
return [... w = z, y...](struct x1)
{};
};
L(V<0>{});
}
```
Seems to be introduced since clang 17.1.0

Contributor guide

Open the contributing guide

Research direction

Start with the linked Compiler Explorer reproduction and run the C++ snippet across Clang versions, particularly around 17.1.0, to confirm when the SIGSEGV ICE appears. Done means the reproducer no longer crashes Clang and a regression test covers the lambda init-capture pack case.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
compilers
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.