-
Notifications
You must be signed in to change notification settings - Fork 13.5k
[clang-17 regression] clang from trunk crashes inside clang::TemplateArgument::pack_size() #63782
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
Comments
@llvm/issue-subscribers-clang-frontend |
@Fznamznon any chance your recent fix could be involved here? |
I don't think so. I'm not seeing any |
According to git-bisect, 6db007a authored by @alexander-shaposhnikov is the first bad commit. The properly symbolized stacktrace: https://pastebin.ubuntu.com/p/q3s55j3tNC/ |
Another crashing example that results in a similar stacktrace: using size_t = decltype(sizeof(int));
template<typename... Ts> struct S {
template<size_t N>
requires(N <= sizeof...(Ts))
void f(int);
};
template<typename... Ts>
template<size_t N>
requires(N <= sizeof...(Ts))
void S<Ts...>::f(int) {}
This also bisects to 6db007a. Compiler Explorer link: https://godbolt.org/z/s9YvEG5rn. |
I really hope @alexander-shaposhnikov can take a look at this, I've been away from this for long enough, and I likely wont have a chance to look at it 'soon'. |
Hi, I'll try to look into this in the coming weeks, but I'm really busy with completely unrelated things at the moment / can't promise. |
I spent a little time that I had to spare in the debugger with this one, but I'm a touch lost. The function in question is: https://clang.llvm.org/doxygen/classclang_1_1Sema.html#a0b0f6c317ec8c9f08dcb406114c43644 The issue is at line 732: https://clang.llvm.org/doxygen/SemaTemplateVariadic_8cpp_source.html#l00732 In @michael-jabbour-sonarsource 's example, we're assuming the argument (the only one, at 0,0) is a pack, it is NOT. It is a |
Further digging shows that just handling the |
The issue is here... SOMEWHERE: 6db007a#diff-dae8060cd0876af2d1e1376f5da83d22a01fd1b49730cee2deaee9727e64e0e4R221 |
Hello. |
Looks fixed in trunk |
The following piece of code leads to ICE when compiled with clang from trunk:
Compiler Explorer with full stacktrace: https://godbolt.org/z/n6bro9Tcd
The text was updated successfully, but these errors were encountered: