Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clang with -std=c++2a crashes on invalid recursive variadic template struct definition #181

Closed
rgreenblatt opened this issue Mar 14, 2020 · 5 comments

Comments

@rgreenblatt
Copy link

rgreenblatt commented Mar 14, 2020

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.

backtrace.txt

Here is a zip with the backtrace, preprocessed source and associated run script.
bug-report.zip

@rgreenblatt
Copy link
Author

I ran into this when including some parts of libstdc++ and having errors from elsewhere. The fact that the struct in this case is invalid may not be the root cause of the issue.

@rgreenblatt rgreenblatt changed the title Clang with -std=c++2a crashes on invalid recursive struct definition Clang with -std=c++2a crashes on invalid recursive variadic template struct definition Mar 14, 2020
@zmodem
Copy link
Collaborator

zmodem commented Mar 16, 2020

Bisection points to this commit:


commit 67c608a
Author: Saar Raz saar@raz.email
Date: Fri Jan 24 00:43:22 2020 +0200

[Concepts] Deprecate -fconcepts-ts, enable Concepts under -std=c++2a  
                                                                                           
Now with concepts support merged and mostly complete, we do not need -fconcepts-ts
(which was also misleading as we were not implementing the TS) and can enable
concepts features under C++2a. A warning will be generated if users still attempt
to use -fconcepts-ts.

@saarraz can you take a look?

@saarraz
Copy link
Contributor

saarraz commented Mar 16, 2020 via email

@saarraz
Copy link
Contributor

saarraz commented Mar 16, 2020

Fixed 19fccc5

@rgreenblatt
Copy link
Author

This seems to be resolved, and I can't get any more crashes when using trunk.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants