[llvm-bugs] [Bug 45207] New: Crash on invalid recursive variadic template struct definition

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Mar 14 15:20:46 PDT 2020


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

            Bug ID: 45207
           Summary: Crash on invalid recursive variadic template struct
                    definition
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: C++2a
          Assignee: unassignedclangbugs at nondot.org
          Reporter: ryan_greenblatt at brown.edu
                CC: blitzrakete at gmail.com, erik.pilkington at gmail.com,
                    llvm-bugs at lists.llvm.org, richard-llvm at metafoo.co.uk

I have filed the same bug on github here:
https://github.com/llvm/llvm-project/issues/181, but I am posting here for
completeness.

This happens with 10 rc2/rc3 and latest dev built from source.

This is a pretty minimal reproduction:
```
template <char First, char... Rest> struct Recursive {
  using next = typename Recursive<Rest...>::type;
  using type = notdefined<next::anything>;
};
```

Build with `clang++ -std=c++2a test.cpp`
It doesn't crash with `-std=c++17`

I made a docker container which reproduces the issue:
https://hub.docker.com/r/greenblattryan/clang-crash-recursive-template.

Backtrace: https://github.com/llvm/llvm-project/files/4333084/backtrace.txt

Here is a zip with the backtrace, preprocessed source and associated run
script.
https://github.com/llvm/llvm-project/files/4333081/bug-report.zip

-- 
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/20200314/fd76d686/attachment.html>


More information about the llvm-bugs mailing list