rupprecht added a comment.

Ugh, I left cvise running overnight and forgot to include the validity check by 
building with a previous clang, so my reduction is invalid. I'm going to run it 
again, but here's the invalid crasher in the meantime:

  struct SourceLocation {
    static SourceLocation current(const char * = __builtin_FILE()) {
      struct Metadata {
        Metadata(SourceLocation = current());
        namespace struct {
          int x = z(x, Metadata())
        } y {
        }

stack trace:

  clang: /home/rupprecht/src/llvm-project/clang/include/clang/AST/Type.h:752: 
const ExtQualsTypeCommonBase *clang::QualType::getCommonPtr() const: Assertion 
`!isNull() && "Cannot retrieve a NULL type pointer"' failed.
  PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ 
and include the crash backtrace, preprocessed source, and associated run script.
  Stack dump:
  0.      Program arguments: bin/clang -c /tmp/repro.cc -std=c++17 -o 
/tmp/repro.o
  1.      <eof> parser at end of file
  2.      /tmp/repro.cc:1:1: parsing struct/union/class body 'SourceLocation'
  3.      /tmp/repro.cc:2:66: parsing function body 'SourceLocation::current'
  4.      /tmp/repro.cc:2:66: in compound statement ('{}')
   #0 0x00005645aaceaaba llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) 
/home/rupprecht/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:567:11
   #1 0x00005645aaceac6b PrintStackTraceSignalHandler(void*) 
/home/rupprecht/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:641:1
   #2 0x00005645aace92f6 llvm::sys::RunSignalHandlers() 
/home/rupprecht/src/llvm-project/llvm/lib/Support/Signals.cpp:104:5
   #3 0x00005645aacea3ae llvm::sys::CleanupOnSignal(unsigned long) 
/home/rupprecht/src/llvm-project/llvm/lib/Support/Unix/Signals.inc:367:1
   #4 0x00005645aac01187 (anonymous 
namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) 
/home/rupprecht/src/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:0:7
   #5 0x00005645aac015dc CrashRecoverySignalHandler(int) 
/home/rupprecht/src/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:398:1
   #6 0x00007f34de23daa0 (/lib/x86_64-linux-gnu/libc.so.6+0x3daa0)
   #7 0x00007f34de28957c __pthread_kill_implementation 
./nptl/pthread_kill.c:44:76
   #8 0x00007f34de23da02 gsignal ./signal/../sysdeps/posix/raise.c:27:6
   #9 0x00007f34de228469 abort ./stdlib/abort.c:81:7
  #10 0x00007f34de228395 _nl_load_domain ./intl/loadmsgcat.c:1177:9
  #11 0x00007f34de236ab2 (/lib/x86_64-linux-gnu/libc.so.6+0x36ab2)
  #12 0x00005645ab1dae17 clang::QualType::getCommonPtr() const 
/home/rupprecht/src/llvm-project/clang/include/clang/AST/Type.h:0:5
  #13 0x00005645ab1dada5 clang::QualType::getTypePtr() const 
/home/rupprecht/src/llvm-project/clang/include/clang/AST/Type.h:6622:26
  #14 0x00005645ab1da995 clang::QualType::operator->() const 
/home/rupprecht/src/llvm-project/clang/include/clang/AST/Type.h:794:5
  #15 0x00005645b071fe92 clang::computeDependence(clang::CXXThisExpr*) 
/home/rupprecht/src/llvm-project/clang/lib/AST/ComputeDependence.cpp:312:43
  #16 0x00005645aed30c16 clang::CXXThisExpr::CXXThisExpr(clang::SourceLocation, 
clang::QualType, bool) 
/home/rupprecht/src/llvm-project/clang/include/clang/AST/ExprCXX.h:1154:19
  #17 0x00005645af7f7c53 clang::Sema::BuildCXXThisExpr(clang::SourceLocation, 
clang::QualType, bool) 
/home/rupprecht/src/llvm-project/clang/lib/Sema/SemaExprCXX.cpp:1400:30
  #18 0x00005645af7d46a8 
clang::TreeTransform<EnsureImmediateInvocationInDefaultArgs>::RebuildCXXThisExpr(clang::SourceLocation,
 clang::QualType, bool) 
/home/rupprecht/src/llvm-project/clang/lib/Sema/TreeTransform.h:3196:22
  #19 0x00005645af7b09ae 
clang::TreeTransform<EnsureImmediateInvocationInDefaultArgs>::TransformCXXThisExpr(clang::CXXThisExpr*)
 /home/rupprecht/src/llvm-project/clang/lib/Sema/TreeTransform.h:12139:23
  #20 0x00005645af7a9ec5 
clang::TreeTransform<EnsureImmediateInvocationInDefaultArgs>::TransformExpr(clang::Expr*)
 
/home/rupprecht/src/llvm-build/dev/tools/clang/include/clang/AST/StmtNodes.inc:907:1
  #21 0x00005645af7b5097 
clang::TreeTransform<EnsureImmediateInvocationInDefaultArgs>::TransformMemberExpr(clang::MemberExpr*)
 /home/rupprecht/src/llvm-project/clang/lib/Sema/TreeTransform.h:11224:34
  #22 0x00005645af7aa857 
clang::TreeTransform<EnsureImmediateInvocationInDefaultArgs>::TransformExpr(clang::Expr*)
 
/home/rupprecht/src/llvm-build/dev/tools/clang/include/clang/AST/StmtNodes.inc:1249:1
  #23 0x00005645af7b945a 
clang::TreeTransform<EnsureImmediateInvocationInDefaultArgs>::TransformRecoveryExpr(clang::RecoveryExpr*)
 /home/rupprecht/src/llvm-project/clang/lib/Sema/TreeTransform.h:10929:36
  #24 0x00005645af7aade4 
clang::TreeTransform<EnsureImmediateInvocationInDefaultArgs>::TransformExpr(clang::Expr*)
 
/home/rupprecht/src/llvm-build/dev/tools/clang/include/clang/AST/StmtNodes.inc:1431:1
  #25 0x00005645af71b9fe 
clang::TreeTransform<EnsureImmediateInvocationInDefaultArgs>::TransformInitializer(clang::Expr*,
 bool) /home/rupprecht/src/llvm-project/clang/lib/Sema/TreeTransform.h:4006:25
  #26 0x00005645af533e03 
clang::Sema::BuildCXXDefaultInitExpr(clang::SourceLocation, clang::FieldDecl*) 
/home/rupprecht/src/llvm-project/clang/lib/Sema/SemaExpr.cpp:6090:19
  #27 0x00005645af995bcf (anonymous 
namespace)::InitListChecker::FillInEmptyInitForField(unsigned int, 
clang::FieldDecl*, clang::InitializedEntity const&, clang::InitListExpr*, 
bool&, bool) /home/rupprecht/src/llvm-project/clang/lib/Sema/SemaInit.cpp:688:32
  #28 0x00005645af98aac1 (anonymous 
namespace)::InitListChecker::FillInEmptyInitializations(clang::InitializedEntity
 const&, clang::InitListExpr*, bool&, clang::InitListExpr*, unsigned int, bool) 
/home/rupprecht/src/llvm-project/clang/lib/Sema/SemaInit.cpp:832:9
  #29 0x00005645af972d8f (anonymous 
namespace)::InitListChecker::InitListChecker(clang::Sema&, 
clang::InitializedEntity const&, clang::InitListExpr*, clang::QualType&, bool, 
bool, bool) /home/rupprecht/src/llvm-project/clang/lib/Sema/SemaInit.cpp:979:28
  #30 0x00005645af97ebe3 clang::InitializationSequence::Perform(clang::Sema&, 
clang::InitializedEntity const&, clang::InitializationKind const&, 
llvm::MutableArrayRef<clang::Expr*>, clang::QualType*) 
/home/rupprecht/src/llvm-project/clang/lib/Sema/SemaInit.cpp:8555:27
  #31 0x00005645af0b1a67 clang::Sema::AddInitializerToDecl(clang::Decl*, 
clang::Expr*, bool) 
/home/rupprecht/src/llvm-project/clang/lib/Sema/SemaDecl.cpp:13027:33
  #32 0x00005645aec9bb4a 
clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(clang::Declarator&, 
clang::Parser::ParsedTemplateInfo const&, clang::Parser::ForRangeInit*) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseDecl.cpp:0:15
  #33 0x00005645aec99a98 clang::Parser::ParseDeclGroup(clang::ParsingDeclSpec&, 
clang::DeclaratorContext, clang::ParsedAttributes&, clang::SourceLocation*, 
clang::Parser::ForRangeInit*) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseDecl.cpp:2196:9
  #34 0x00005645aec98ae1 
clang::Parser::ParseSimpleDeclaration(clang::DeclaratorContext, 
clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, 
bool, clang::Parser::ForRangeInit*, clang::SourceLocation*) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseDecl.cpp:1893:10
  #35 0x00005645aec98719 
clang::Parser::ParseDeclaration(clang::DeclaratorContext, 
clang::SourceLocation&, clang::ParsedAttributes&, clang::ParsedAttributes&, 
clang::SourceLocation*) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseDecl.cpp:1821:12
  #36 0x00005645aec356d9 
clang::Parser::ParseStatementOrDeclarationAfterAttributes(llvm::SmallVector<clang::Stmt*,
 32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*, 
clang::ParsedAttributes&, clang::ParsedAttributes&) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseStmt.cpp:247:16
  #37 0x00005645aec3503b 
clang::Parser::ParseStatementOrDeclaration(llvm::SmallVector<clang::Stmt*, 
32u>&, clang::Parser::ParsedStmtContext, clang::SourceLocation*) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseStmt.cpp:115:20
  #38 0x00005645aec3dca2 clang::Parser::ParseCompoundStatementBody(bool) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseStmt.cpp:1185:11
  #39 0x00005645aec3f3a4 
clang::Parser::ParseFunctionStatementBody(clang::Decl*, 
clang::Parser::ParseScope&) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseStmt.cpp:2449:21
  #40 0x00005645aecbb1b9 
clang::Parser::ParseLexedMethodDef(clang::Parser::LexedMethod&) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:0:3
  #41 0x00005645aecbac69 clang::Parser::LexedMethod::ParseLexedMethodDefs() 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:275:1
  #42 0x00005645aecb9c5a 
clang::Parser::ParseLexedMethodDefs(clang::Parser::ParsingClass&) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseCXXInlineMethods.cpp:527:33
  #43 0x00005645aec6b83f 
clang::Parser::ParseCXXMemberSpecification(clang::SourceLocation, 
clang::SourceLocation, clang::ParsedAttributes&, unsigned int, clang::Decl*) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:3629:5
  #44 0x00005645aec69a34 
clang::Parser::ParseClassSpecifier(clang::tok::TokenKind, 
clang::SourceLocation, clang::DeclSpec&, clang::Parser::ParsedTemplateInfo 
const&, clang::AccessSpecifier, bool, clang::Parser::DeclSpecContext, 
clang::ParsedAttributes&) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseDeclCXX.cpp:2103:7
  #45 0x00005645aeca0586 
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, 
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, 
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*, 
clang::ImplicitTypenameContext) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseDecl.cpp:4225:23
  #46 0x00005645aec05f12 
clang::Parser::ParseDeclarationSpecifiers(clang::DeclSpec&, 
clang::Parser::ParsedTemplateInfo const&, clang::AccessSpecifier, 
clang::Parser::DeclSpecContext, clang::Parser::LateParsedAttrList*) 
/home/rupprecht/src/llvm-project/clang/include/clang/Parse/Parser.h:2417:5
  #47 0x00005645aebff146 
clang::Parser::ParseDeclOrFunctionDefInternal(clang::ParsedAttributes&, 
clang::ParsedAttributes&, clang::ParsingDeclSpec&, clang::AccessSpecifier) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/Parser.cpp:1120:7
  #48 0x00005645aebfec6f 
clang::Parser::ParseDeclarationOrFunctionDefinition(clang::ParsedAttributes&, 
clang::ParsedAttributes&, clang::ParsingDeclSpec*, clang::AccessSpecifier) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/Parser.cpp:1222:12
  #49 0x00005645aebfe53f 
clang::Parser::ParseExternalDeclaration(clang::ParsedAttributes&, 
clang::ParsedAttributes&, clang::ParsingDeclSpec*) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/Parser.cpp:1037:14
  #50 0x00005645aebfc406 
clang::Parser::ParseTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, 
clang::Sema::ModuleImportState&) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/Parser.cpp:743:12
  #51 0x00005645aebfbac0 
clang::Parser::ParseFirstTopLevelDecl(clang::OpaquePtr<clang::DeclGroupRef>&, 
clang::Sema::ModuleImportState&) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/Parser.cpp:591:8
  #52 0x00005645aebf6f48 clang::ParseAST(clang::Sema&, bool, bool) 
/home/rupprecht/src/llvm-project/clang/lib/Parse/ParseAST.cpp:161:15
  #53 0x00005645ac094226 clang::ASTFrontendAction::ExecuteAction() 
/home/rupprecht/src/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1164:1
  #54 0x00005645ac270234 clang::CodeGenAction::ExecuteAction() 
/home/rupprecht/src/llvm-project/clang/lib/CodeGen/CodeGenAction.cpp:1170:5
  #55 0x00005645ac093c4c clang::FrontendAction::Execute() 
/home/rupprecht/src/llvm-project/clang/lib/Frontend/FrontendAction.cpp:1059:7
  #56 0x00005645abfc5b5c 
clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) 
/home/rupprecht/src/llvm-project/clang/lib/Frontend/CompilerInstance.cpp:1046:23
  #57 0x00005645ac25ad37 
clang::ExecuteCompilerInvocation(clang::CompilerInstance*) 
/home/rupprecht/src/llvm-project/clang/lib/FrontendTool/ExecuteCompilerInvocation.cpp:264:8
  #58 0x00005645a741eb00 cc1_main(llvm::ArrayRef<char const*>, char const*, 
void*) /home/rupprecht/src/llvm-project/clang/tools/driver/cc1_main.cpp:251:13
  #59 0x00005645a740ca55 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&) 
/home/rupprecht/src/llvm-project/clang/tools/driver/driver.cpp:353:5
  #60 0x00005645abe88bd5 
clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>,
 std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char>>*, bool*) const::$_1::operator()() const 
/home/rupprecht/src/llvm-project/clang/lib/Driver/Job.cpp:428:34
  #61 0x00005645abe88ba5 void llvm::function_ref<void 
()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>,
 std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char>>*, bool*) const::$_1>(long) 
/home/rupprecht/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:45:5
  #62 0x00005645a992ab49 llvm::function_ref<void ()>::operator()() const 
/home/rupprecht/src/llvm-project/llvm/include/llvm/ADT/STLFunctionalExtras.h:68:5
  #63 0x00005645aac00f9a 
llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) 
/home/rupprecht/src/llvm-project/llvm/lib/Support/CrashRecoveryContext.cpp:434:3
  #64 0x00005645abe8838b 
clang::driver::CC1Command::Execute(llvm::ArrayRef<std::optional<llvm::StringRef>>,
 std::__cxx11::basic_string<char, std::char_traits<char>, 
std::allocator<char>>*, bool*) const 
/home/rupprecht/src/llvm-project/clang/lib/Driver/Job.cpp:428:7
  #65 0x00005645abe2890f 
clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, 
clang::driver::Command const*&, bool) const 
/home/rupprecht/src/llvm-project/clang/lib/Driver/Compilation.cpp:199:15
  #66 0x00005645abe28b17 
clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, 
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&, bool) 
const /home/rupprecht/src/llvm-project/clang/lib/Driver/Compilation.cpp:253:13
  #67 0x00005645abe41d58 
clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, 
llvm::SmallVectorImpl<std::pair<int, clang::driver::Command const*>>&) 
/home/rupprecht/src/llvm-project/clang/lib/Driver/Driver.cpp:1817:7
  #68 0x00005645a740c4df clang_main(int, char**) 
/home/rupprecht/src/llvm-project/clang/tools/driver/driver.cpp:555:9


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D136554/new/

https://reviews.llvm.org/D136554

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to