https://bugs.llvm.org/show_bug.cgi?id=49720

            Bug ID: 49720
           Summary: SIGSEGV in recursive function template with generic
                    lambda argument
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

The following translation unit

```
template<typename Outer>
auto recurse(Outer outer_lambda) {
        outer_lambda(0);
        auto lambda = [](auto) {};
        recurse(lambda);
}

void start() {
        recurse([](int) {});
}
```

should hit the template instantiation depth and fail to compile. Instead, the
compiler crashes with a SIGSEGV, even with assertions enabled.

See it live: https://godbolt.org/z/6q7vbx8qb

It looks like this was introduced in clang 4.0.0

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to