[llvm-bugs] [Bug 49720] New: SIGSEGV in recursive function template with generic lambda argument
via llvm-bugs
llvm-bugs at lists.llvm.org
Wed Mar 24 20:55:45 PDT 2021
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: unassignedclangbugs at nondot.org
Reporter: davidfromonline at gmail.com
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20210325/0ec79388/attachment-0001.html>
More information about the llvm-bugs
mailing list