https://llvm.org/bugs/show_bug.cgi?id=31548
Bug ID: 31548 Summary: NewImportAttr nullptr dereference Product: clang Version: trunk Hardware: PC OS: Windows NT Status: NEW Severity: normal Priority: P Component: Frontend Assignee: unassignedclangb...@nondot.org Reporter: tras...@gmail.com CC: llvm-bugs@lists.llvm.org Classification: Unclassified __declspec(dllimport) uint qHash() ; template <> uint qHash $ clang.exe -c test.cpp Wrote crash dump file "C:\Users\holl\AppData\Local\CrashDumps\clang.exe.484a0d.dmp" #0 0x00000001418929f7 checkDLLAttributeRedeclaration tools\clang\lib\sema\semadecl.cpp:5735:0 #1 0x0000000141872ef8 clang::Sema::ActOnVariableDeclarator(class clang::Scope *,class clang::Declarator &,class clang::DeclContext *,class clang::TypeSourceInfo *,class clang::LookupResult &,class llvm::MutableArrayRef<class clang::TemplateParameterList *>,bool &,class llvm::ArrayRef<class clang::BindingDecl *>) tools\clang\lib\sema\semadecl.cpp:6566:0 #2 0x0000000141886dcf clang::Sema::HandleDeclarator(class clang::Scope *,class clang::Declarator &,class llvm::MutableArrayRef<class clang::TemplateParameterList *>) tools\clang\lib\sema\semadecl.cpp:5176:0 #3 0x000000014199a116 clang::Sema::ActOnTemplateDeclarator(class clang::Scope *,class llvm::MutableArrayRef<class clang::TemplateParameterList *>,class clang::Declarator &) tools\clang\lib\sema\sematemplate.cpp:6815:0 #4 0x0000000141668f7a clang::Parser::ParseDeclarationAfterDeclaratorAndAttributes(class clang::Declarator &,struct clang::Parser::ParsedTemplateInfo const &,struct clang::Parser::ForRangeInit *) tools\clang\lib\parse\parsedecl.cpp:1993:0 #5 0x0000000141680417 clang::Parser::ParseSingleDeclarationAfterTemplate(unsigned int,struct clang::Parser::ParsedTemplateInfo const &,class clang::ParsingDeclRAIIObject &,class clang::SourceLocation &,enum clang::AccessSpecifier,class clang::AttributeList *) tools\clang\lib\parse\parsetemplate.cpp:308:0 #6 0x0000000141680d71 clang::Parser::ParseTemplateDeclarationOrSpecialization(unsigned int,class clang::SourceLocation &,enum clang::AccessSpecifier,class clang::AttributeList *) tools\clang\lib\parse\parsetemplate.cpp:152:0 #7 0x000000014167e7ad clang::Parser::ParseDeclarationStartingWithTemplate(unsigned int,class clang::SourceLocation &,enum clang::AccessSpecifier,class clang::AttributeList *) tools\clang\lib\parse\parsetemplate.cpp:38:0 #8 0x0000000141668914 clang::Parser::ParseDeclaration(unsigned int,class clang::SourceLocation &,struct clang::Parser::ParsedAttributesWithRange &) tools\clang\lib\parse\parsedecl.cpp:1514:0 #9 0x00000001416510af clang::Parser::ParseExternalDeclaration(struct clang::Parser::ParsedAttributesWithRange &,class clang::ParsingDeclSpec *) tools\clang\lib\parse\parser.cpp:788:0 #10 0x0000000141654480 clang::Parser::ParseTopLevelDecl(class clang::OpaquePtr<class clang::DeclGroupRef> &) tools\clang\lib\parse\parser.cpp:628:0 clang.exe: error: clang frontend command failed due to signal (use -v to see invocation) clang version 4.0.0 (trunk 290951) Target: x86_64-pc-windows-msvc Thread model: posix crash site: if (IsMicrosoft && IsDefinition) { S.Diag(NewDecl->getLocation(), diag::warn_redeclaration_without_import_attribute) << NewDecl; S.Diag(OldDecl->getLocation(), diag::note_previous_declaration); NewDecl->dropAttr<DLLImportAttr>(); NewDecl->addAttr(::new (S.Context) DLLExportAttr( NewImportAttr->getRange(), S.Context, NewImportAttr->getSpellingListIndex())); } -- You are receiving this mail because: You are on the CC list for the bug.
_______________________________________________ llvm-bugs mailing list llvm-bugs@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs