ClangToTMac failing with assert "Default argument is not yet instantiated!" |
|
Issue descriptionFor example: https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/13702 [46/41483] OBJCXX obj/base/base/precompile.h-mm.gch FAILED: obj/base/base/precompile.h-mm.gch export DEVELOPER_DIR=/b/c/b/ClangToTMac/src/build/mac_files/Xcode.app; ../../third_party/llvm-build/Release+Asserts/bin/clang++ -MMD -MF obj/base/base/precompile.h-mm.gch.d -DSYSTEM_NATIVE_UTF8 -DV8_DEPRECATION_WARNINGS -DNO_TCMALLOC -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -DENABLE_MEDIA_ROUTER=1 -DFIELDTRIAL_TESTING_ENABLED -DCR_CLANG_REVISION=\"300068\" -DCR_XCODE_VERSION=0511 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D_FORTIFY_SOURCE=2 -DCOMPONENT_BUILD -D__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DBASE_IMPLEMENTATION -I../.. -Igen -fno-strict-aliasing -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -fcolor-diagnostics -arch x86_64 -Wall -Werror -Wextra -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -fno-omit-frame-pointer -g1 -isysroot /b/c/b/ClangToTMac/src/build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -mmacosx-version-min=10.9 -fvisibility=hidden -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wexit-time-destructors -Wexit-time-destructors -O2 -fvisibility-inlines-hidden -std=c++11 -stdlib=libc++ -fobjc-call-cxx-cdtors -Wobjc-missing-property-synthesis -fno-rtti -fno-exceptions -x objective-c++-header -c ../../build/precompile.h -o obj/base/base/precompile.h-mm.gch Assertion failed: (!hasUninstantiatedDefaultArg() && "Default argument is not yet instantiated!"), function getDefaultArg, file /b/c/b/ClangToTMac/src/third_party/llvm/tools/clang/lib/AST/Decl.cpp, line 2424. 0 clang-5.0 0x000000010d18a128 llvm::sys::PrintStackTrace(llvm::raw_ostream&) + 40 1 clang-5.0 0x000000010d18a826 llvm::sys::PrintStackTraceOnErrorSignal(llvm::StringRef, bool) + 838 2 libsystem_platform.dylib 0x00007fffde723bba _sigtramp + 26 3 libsystem_platform.dylib 000000000000000000 _sigtramp + 562938976 4 libsystem_c.dylib 0x00007fffde5aa420 abort + 129 5 libsystem_c.dylib 0x00007fffde571893 basename_r + 0 6 clang-5.0 0x000000010ec3dcdd clang::ParmVarDecl::getDefaultArg() + 109 7 clang-5.0 0x000000010ed3b639 clang::ODRHash::AddType(clang::Type const*) + 409 8 clang-5.0 0x000000010ed3bb42 clang::ODRHash::AddType(clang::Type const*) + 1698 9 clang-5.0 0x000000010ed3b3cf clang::ODRHash::AddCXXRecordDecl(clang::CXXRecordDecl const*) + 463 10 clang-5.0 0x000000010ec62616 clang::CXXRecordDecl::getODRHash() const + 294 11 clang-5.0 0x000000010e19d259 clang::ASTRecordWriter::AddCXXDefinitionData(clang::CXXRecordDecl const*) + 1753 12 clang-5.0 0x000000010e1b80fa clang::ASTDeclWriter::VisitCXXRecordDecl(clang::CXXRecordDecl*) + 314 13 clang-5.0 0x000000010e1b9580 clang::ASTDeclWriter::VisitClassTemplateSpecializationDecl(clang::ClassTemplateSpecializationDecl*) + 128 14 clang-5.0 0x000000010e1aeba6 clang::ASTDeclWriter::Visit(clang::Decl*) + 22 15 clang-5.0 0x000000010e1c254b clang::ASTWriter::WriteDecl(clang::ASTContext&, clang::Decl*) + 459 16 clang-5.0 0x000000010e199d3a clang::ASTWriter::WriteASTCore(clang::Sema&, llvm::StringRef, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, clang::Module*) + 12154 17 clang-5.0 0x000000010e196c3c clang::ASTWriter::WriteAST(clang::Sema&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&, clang::Module*, llvm::StringRef, bool) + 652 18 clang-5.0 0x000000010e1d90ab clang::PCHGenerator::HandleTranslationUnit(clang::ASTContext&) + 251 19 clang-5.0 0x000000010d8aa44c clang::MultiplexConsumer::HandleTranslationUnit(clang::ASTContext&) + 44 20 clang-5.0 0x000000010dfebeb5 clang::ParseAST(clang::Sema&, bool, bool) + 469 21 clang-5.0 0x000000010d8686bc clang::FrontendAction::Execute() + 76 22 clang-5.0 0x000000010d825ce1 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 1217 23 clang-5.0 0x000000010d8c9cb2 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4914 24 clang-5.0 0x000000010b9e0f0c cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1388 25 clang-5.0 0x000000010b9df5d3 main + 11875 26 libdyld.dylib 0x00007fffde516255 start + 1 27 libdyld.dylib 0x000000000000008f start + 565091899 Stack dump: 0. Program arguments: /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/bin/clang-5.0 -cc1 -triple x86_64-apple-macosx10.9.0 -Wdeprecated-objc-isa-usage -Werror=deprecated-objc-isa-usage -emit-pch -disable-free -main-file-name precompile.h -mrelocation-model pic -pic-level 2 -mthread-model posix -mdisable-fp-elim -relaxed-aliasing -masm-verbose -munwind-tables -target-cpu core2 -target-linker-version 274.1 -dwarf-column-info -debug-info-kind=line-tables-only -dwarf-version=2 -debugger-tuning=lldb -coverage-notes-file /b/c/b/ClangToTMac/src/out/Release/obj/base/base/precompile.h-mm.gcno -resource-dir /b/c/b/ClangToTMac/src/third_party/llvm-build/Release+Asserts/lib/clang/5.0.0 -dependency-file obj/base/base/precompile.h-mm.gch.d -MT obj/base/base/precompile.h-mm.gch -module-file-deps -isysroot /b/c/b/ClangToTMac/src/build/mac_files/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.10.sdk -D SYSTEM_NATIVE_UTF8 -D V8_DEPRECATION_WARNINGS -D NO_TCMALLOC -D FULL_SAFE_BROWSING -D SAFE_BROWSING_CSD -D SAFE_BROWSING_DB_LOCAL -D CHROMIUM_BUILD -D ENABLE_MEDIA_ROUTER=1 -D FIELDTRIAL_TESTING_ENABLED -D CR_CLANG_REVISION="300068" -D CR_XCODE_VERSION=0511 -D __STDC_CONSTANT_MACROS -D __STDC_FORMAT_MACROS -D _FORTIFY_SOURCE=2 -D COMPONENT_BUILD -D __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0 -D NDEBUG -D NVALGRIND -D DYNAMIC_ANNOTATIONS_ENABLED=0 -D BASE_IMPLEMENTATION -I ../.. -I gen -D __DATE__= -D __TIME__= -D __TIMESTAMP__= -stdlib=libc++ -O2 -Wno-builtin-macro-redefined -Wall -Werror -Wextra -Wpartial-availability -Wno-missing-field-initializers -Wno-unused-parameter -Wno-c++11-narrowing -Wno-covered-switch-default -Wno-unneeded-internal-declaration -Wno-inconsistent-missing-override -Wno-undefined-var-template -Wno-nonportable-include-path -Wno-address-of-packed-member -Wno-unused-lambda-capture -Wno-user-defined-warnings -Wheader-hygiene -Wstring-conversion -Wtautological-overlap-compare -Wno-char-subscripts -Wexit-time-destructors -Wexit-time-destructors -Wobjc-missing-property-synthesis -std=c++11 -fdeprecated-macro -fdebug-compilation-dir /b/c/b/ClangToTMac/src/out/Release -ferror-limit 19 -fmessage-length 0 -fvisibility hidden -fvisibility-inlines-hidden -stack-protector 1 -fblocks -fno-rtti -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fobjc-exceptions -fexceptions -fmax-type-align=16 -fdiagnostics-show-option -fcolor-diagnostics -vectorize-loops -vectorize-slp -o obj/base/base/precompile.h-mm.gch -x objective-c++-header ../../build/precompile.h 1. <eof> parser at end of file clang-5.0: error: unable to execute command: Abort trap: 6 clang-5.0: error: clang frontend command failed due to signal (use -v to see invocation) clang version 5.0.0 (trunk 300068) Target: x86_64-apple-darwin16.3.0 Thread model: posix InstalledDir: /b/c/b/ClangToTMac/src/out/Release/../../third_party/llvm-build/Release+Asserts/bin clang-5.0: note: diagnostic msg: PLEASE submit a bug report to http://llvm.org/bugs/ and include the crash backtrace, preprocessed source, and associated run script. clang-5.0: note: diagnostic msg: ******************** PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT: Preprocessed source(s) and associated run script(s) are located at: clang-5.0: note: diagnostic msg: /var/folders/p4/py6nlvcx4fs5s3fg51_pzqmc0000gm/T/precompile-03b88b.h clang-5.0: note: diagnostic msg: /var/folders/p4/py6nlvcx4fs5s3fg51_pzqmc0000gm/T/precompile-03b88b.sh clang-5.0: note: diagnostic msg: Crash backtrace is located in clang-5.0: note: diagnostic msg: /Users/chrome-bot/Library/Logs/DiagnosticReports/clang-5.0_<YYYY-MM-DD-HHMMSS>_<hostname>.crash clang-5.0: note: diagnostic msg: (choose the .crash file that corresponds to your crash) clang-5.0: note: diagnostic msg: ******************** Last good build: https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/13675 Clang 299979 First bad: https://build.chromium.org/p/chromium.fyi/builders/ClangToTMac/builds/13676 Clang 300006 Since ODRHash is on the stack, I'm guessing: ------------------------------------------------------------------------ r299989 | rtrieu | 2017-04-11 14:31:00 -0700 (Tue, 11 Apr 2017) | 9 lines [ODRHash] Improve handling of hash values Calculating the hash in Sema::ActOnTagFinishDefinition could happen before all sub-Decls were parsed or processed, which would produce the wrong hash value. Change to calculating the hash on the first use and storing the value instead. Also, avoid using the macros that were only for Boolean fields and use an explicit checker during the DefintionData merge. No functional change, but was this blocking other ODRHash patches. ------------------------------------------------------------------------ or ------------------------------------------------------------------------ r300001 | rtrieu | 2017-04-11 15:32:03 -0700 (Tue, 11 Apr 2017) | 11 lines Revert r298824 & r298816, recommit r298742 & r298754 r299989 fixes the underlying issue by waiting long enough to late parsed arguments to be processed before doing an calculating the hash. r298742 [ODRHash] Add error messages for mismatched parameters in methods. r298754 [ODRHash] Add support for array and decayed types. ------------------------------------------------------------------------
,
Apr 12 2017
|
|
►
Sign in to add a comment |
|
Comment 1 by h...@chromium.org
, Apr 12 2017