-
Notifications
You must be signed in to change notification settings - Fork 12.6k
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] Assertion `E != nullptr' failed. crashed at clang::NormalizedConstraint::fromConstraintExpr(clang::Sema&, clang::NamedDecl*, clang::Expr const*) #115004
Comments
@llvm/issue-subscribers-clang-frontend Author: Yihan Yang (yijan4845)
**This testcase is generated by a fuzzer.**
Compiler Explorer: https://godbolt.org/z/P1xE1dEx1 This invalid code will crash on Clang Assertion Trunk. template <typename d> concept g = 0;
template <g> struct h;
template <g d>
struct h<d>; This won't crash in clang-19. Stack dump:
|
@llvm/issue-subscribers-c-20 Author: Yihan Yang (yijan4845)
**This testcase is generated by a fuzzer.**
Compiler Explorer: https://godbolt.org/z/P1xE1dEx1 This invalid code will crash on Clang Assertion Trunk. template <typename d> concept g = 0;
template <g> struct h;
template <g d>
struct h<d>; This won't crash in clang-19. Stack dump:
|
…122065) After 0dedd6f and 03229e7, invalid concept declarations might lack expressions for evaluation and normalization. This could make it crash in certain scenarios, apart from the one of evaluation concepts showed in 03229e7, there's also an issue when checking specializations where the normalization also relies on a non-null expression. This patch prevents that by avoiding building up a type constraint in such situations, thereafter the template parameter wouldn't have a concept specialization of a null expression. With this patch, the assumption in ASTWriterDecl is no longer valid. Namely, HasConstraint and TypeConstraintInitialized must now represent different meanings for both source fidelity and semantic requirements. Fixes llvm#115004 Fixes llvm#121980
…alid (#122065) After 0dedd6f and 03229e7, invalid concept declarations might lack expressions for evaluation and normalization. This could make it crash in certain scenarios, apart from the one of evaluation concepts showed in 03229e7, there's also an issue when checking specializations where the normalization also relies on a non-null expression. This patch prevents that by avoiding building up a type constraint in such situations, thereafter the template parameter wouldn't have a concept specialization of a null expression. With this patch, the assumption in ASTWriterDecl is no longer valid. Namely, HasConstraint and TypeConstraintInitialized must now represent different meanings for both source fidelity and semantic requirements. Fixes llvm/llvm-project#115004 Fixes llvm/llvm-project#121980
This testcase is generated by a fuzzer.
Compiler Explorer: https://godbolt.org/z/P1xE1dEx1
This invalid code will crash on Clang Assertion Trunk.
This won't crash in clang-19.
Stack dump:
The text was updated successfully, but these errors were encountered: