Anush Elangovan via llvm-dev
2018-Sep-19 23:24 UTC
[llvm-dev] clang-cl crash in CommentParser.cpp
Has anyone been able to compile opencv with clang-cl ? We are trying to switch over to using clang-cl instead of MSVC since MSVC in VS2017 dies trying to compile/optimize some of our internal code but clang-cl works well. However clang-cl fails building upstream opencv which we use for quick prototyping. Traceback attached and also filed a bug here: https://bugs.llvm.org/show_bug.cgi?id=39007 Thanks Anush \opencv\modules\core\include\opencv2/core/types.hpp(648,48): warning: noexcept specifications are incompatible with C++98 [-Wc++98-compat] Scalar_& operator=(Scalar_&& s) CV_NOEXCEPT; ^ Assertion failed: Content.size() != 0, file ..\tools\clang\lib\AST\CommentParser.cpp, line 561 LLVMSymbolizer: error reading file: 'ucrtbased.pdb': no such file or directory LLVMSymbolizer: error reading file: 'kernel32.pdb': no such file or directory LLVMSymbolizer: error reading file: 'ntdll.pdb': no such file or directory #0 0x00007ff7881bb56c HandleAbort d:\llvm\lib\support\windows\signals.inc:409:0 #1 0x00007ffa16d5a381 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6a381) #2 0x00007ffa16d5bf59 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6bf59) #3 0x00007ffa16d6167f (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x7167f) #4 0x00007ffa16d5f671 (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x6f671) #5 0x00007ffa16d61d8f (C:\WINDOWS\SYSTEM32\ucrtbased.dll+0x71d8f) #6 0x00007ff78d59fec9 clang::comments::Parser::parseParagraphOrBlockCommand(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:561:0 #7 0x00007ff78d59ed8d clang::comments::Parser::parseBlockCommand(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:385:0 #8 0x00007ff78d59fff0 clang::comments::Parser::parseParagraphOrBlockCommand(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:576:0 #9 0x00007ff78d5a0ddc clang::comments::Parser::parseBlockContent(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:736:0 #10 0x00007ff78d5a0f1a clang::comments::Parser::parseFullComment(void) d:\llvm\tools\clang\lib\ast\commentparser.cpp:766:0 #11 0x00007ff78d4c8ec1 clang::RawComment::parse(class clang::ASTContext const &,class clang::Preprocessor const *,class clang::Decl const *)const d:\llvm\tools\clang\lib\ast\rawcommentlist.cpp:222:0 #12 0x00007ff78d044d64 clang::ASTContext::getCommentForDecl(class clang::Decl const *,class clang::Preprocessor const *)const d:\llvm\tools\clang\lib\ast\astcontext.cpp:592:0 #13 0x00007ff78bd7ee7c clang::Sema::ActOnDocumentableDecls(class llvm::ArrayRef<class clang::Decl *>) d:\llvm\tools\clang\lib\sema\semadecl.cpp:12287:0 #14 0x00007ff78bd7ec7e clang::Sema::ActOnDocumentableDecl(class clang::Decl *) d:\llvm\tools\clang\lib\sema\semadecl.cpp:12248:0 #15 0x00007ff78bd8ffea clang::Sema::ActOnTagStartDefinition(class clang::Scope *,class clang::Decl *) d:\llvm\tools\clang\lib\sema\semadecl.cpp:14836:0 #16 0x00007ff78b850c10 clang::Parser::ParseCXXMemberSpecification(class clang::SourceLocation,class clang::SourceLocation,struct clang::Parser::ParsedAttributesWithRange &,unsigned int,class clang::Decl *) d:\llvm\tools\clang\lib\parse\parsedeclcxx.cpp:3138:0 #17 0x00007ff78b84ffd1 clang::Parser::ParseClassSpecifier(enum clang::tok::TokenKind,class clang::SourceLocation,class clang::DeclSpec &,struct clang::Parser::ParsedTemplateInfo const &,enum clang::AccessSpecifier,bool,enum clang::Parser::DeclSpecContext,struct clang::Parser::ParsedAttributesWithRange &) d:\llvm\tools\clang\lib\parse\parsedeclcxx.cpp:1900:0 #18 0x00007ff78b79a2c2 clang::Parser::ParseDeclarationSpecifiers(class clang::DeclSpec &,struct clang::Parser::ParsedTemplateInfo const &,enum clang::AccessSpecifier,enum clang::Parser::DeclSpecContext,class clang::Parser::LateParsedAttrList *) d:\llvm\tools\clang\lib\parse\parsedecl.cpp:3700:0 #19 0x00007ff78b759a62 clang::Parser::ParseDeclOrFunctionDefInternal(struct clang::Parser::ParsedAttributesWithRange &,class clang::ParsingDeclSpec &,enum clang::AccessSpecifier) d:\llvm\tools\clang\lib\parse\parser.cpp:930:0 #20 0x00007ff78b759970 clang::Parser::ParseDeclarationOrFunctionDefinition(struct clang::Parser::ParsedAttributesWithRange &,class clang::ParsingDeclSpec *,enum clang::AccessSpecifier) d:\llvm\tools\clang\lib\parse\parser.cpp:1031:0 #21 0x00007ff78b759392 clang::Parser::ParseExternalDeclaration(struct clang::Parser::ParsedAttributesWithRange &,class clang::ParsingDeclSpec *) d:\llvm\tools\clang\lib\parse\parser.cpp:856:0 #22 0x00007ff78b84a566 clang::Parser::ParseInnerNamespace(class std::vector<class clang::SourceLocation,class std::allocator<class clang::SourceLocation> > &,class std::vector<class clang::IdentifierInfo *,class std::allocator<class clang::IdentifierInfo *> > &,class std::vector<class clang::SourceLocation,class std::allocator<class clang::SourceLocation> > &,unsigned int,class clang::SourceLocation &,class clang::ParsedAttributes &,class clang::BalancedDelimiterTracker &) d:\llvm\tools\clang\lib\parse\parsedeclcxx.cpp:221:0 #23 0x00007ff78b84a33d clang::Parser::ParseNamespace(enum clang::DeclaratorContext,class clang::SourceLocation &,class clang::SourceLocation) d:\llvm\tools\clang\lib\parse\parsedeclcxx.cpp:199:0 #24 0x00007ff78b79375b clang::Parser::ParseDeclaration(enum clang::DeclaratorContext,class clang::SourceLocation &,struct clang::Parser::ParsedAttributesWithRange &) d:\llvm\tools\clang\lib\parse\parsedecl.cpp:1682:0 #25 0x00007ff78b758e45 clang::Parser::ParseExternalDeclaration(struct clang::Parser::ParsedAttributesWithRange &,class clang::ParsingDeclSpec *) d:\llvm\tools\clang\lib\parse\parser.cpp:789:0 #26 0x00007ff78b754332 clang::Parser::ParseTopLevelDecl(class clang::OpaquePtr<class clang::DeclGroupRef> &) d:\llvm\tools\clang\lib\parse\parser.cpp:610:0 #27 0x00007ff78b750474 clang::ParseAST(class clang::Sema &,bool,bool) d:\llvm\tools\clang\lib\parse\parseast.cpp:157:0 #28 0x00007ff789295b8b clang::ASTFrontendAction::ExecuteAction(void) d:\llvm\tools\clang\lib\frontend\frontendaction.cpp:1018:0 #29 0x00007ff78da6cf46 clang::CodeGenAction::ExecuteAction(void) d:\llvm\tools\clang\lib\codegen\codegenaction.cpp:1045:0 #30 0x00007ff7892955d7 clang::FrontendAction::Execute(void) d:\llvm\tools\clang\lib\frontend\frontendaction.cpp:919:0 #31 0x00007ff789200e10 clang::CompilerInstance::ExecuteAction(class clang::FrontendAction &) d:\llvm\tools\clang\lib\frontend\compilerinstance.cpp:965:0 #32 0x00007ff78946509b clang::ExecuteCompilerInvocation(class clang::CompilerInstance *) d:\llvm\tools\clang\lib\frontendtool\executecompilerinvocation.cpp:259:0 #33 0x00007ff78486c7c4 cc1_main(class llvm::ArrayRef<char const *>,char const *,void *) d:\llvm\tools\clang\tools\driver\cc1_main.cpp:218:0 #34 0x00007ff78485562d ExecuteCC1Tool d:\llvm\tools\clang\tools\driver\driver.cpp:310:0 #35 0x00007ff784855eaf main d:\llvm\tools\clang\tools\driver\driver.cpp:382:0 #36 0x00007ff78d749454 invoke_main f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:79:0 #37 0x00007ff78d7492fe __scrt_common_main_seh f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:288:0 #38 0x00007ff78d7491be __scrt_common_main f:\dd\vctools\crt\vcstartup\src\startup\exe_common.inl:331:0 #39 0x00007ff78d7494e9 mainCRTStartup f:\dd\vctools\crt\vcstartup\src\startup\exe_main.cpp:17:0 #40 0x00007ffa62113034 (C:\WINDOWS\System32\KERNEL32.DLL+0x13034) #41 0x00007ffa64161461 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x71461) clang-cl: error: clang frontend command failed due to signal (use -v to see invocation) clang version 8.0.0 (https://github.com/llvm-mirror/clang 30d3f201efd974e92af39ab7522ca30ddb2a379a) ( https://github.com/llvm-mirror/llvm 50dce07c8dd6ea205f7ed0c5689237cde40c5796) Target: x86_64-pc-windows-msvc Thread model: posix InstalledDir: D:\llvm\build\bin clang-cl: note: diagnostic msg: PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace, preprocessed source, and associated run script. clang-cl: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-cl: note: diagnostic msg: C:\Users\Anush\AppData\Local\Temp\convert_scale-dc9bd0.sh clang-cl: note: diagnostic msg: -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20180919/e9c29436/attachment.html>