I'm also still getting DenseMap failures on Windows after the MDNode placement new/delete fix. Is this being tracked separately?<br><div class="gmail_quote">On Tue, Dec 9, 2014 at 3:38 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com">dexonsmith@apple.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">This looks like PR21798, I hope.<br>
<br>
> On 2014 Dec 9, at 15:37, Sean Callanan <<a href="mailto:scallanan@apple.com" target="_blank">scallanan@apple.com</a>> wrote:<br>
><br>
> I see this crash while LLDB is exiting in OS X:<br>
> –<br>
> #0 0x000000010b03da7f in bool llvm::DenseMapBase<llvm::<u></u>SmallDenseMap<void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long>, 4u, llvm::DenseMapInfo<void*>, llvm::detail::DenseMapPair<<u></u>void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long> > >, void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long>, llvm::DenseMapInfo<void*>, llvm::detail::DenseMapPair<<u></u>void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long> > >::LookupBucketFor<void*>(<u></u>void* const&, llvm::detail::DenseMapPair<<u></u>void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long> > const*&) const at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/ADT/DenseMap.h:495<br>
> #1 0x000000010b03d918 in bool llvm::DenseMapBase<llvm::<u></u>SmallDenseMap<void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long>, 4u, llvm::DenseMapInfo<void*>, llvm::detail::DenseMapPair<<u></u>void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long> > >, void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long>, llvm::DenseMapInfo<void*>, llvm::detail::DenseMapPair<<u></u>void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long> > >::LookupBucketFor<void*>(<u></u>void* const&, llvm::detail::DenseMapPair<<u></u>void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long> >*&) at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/ADT/DenseMap.h:525<br>
> #2 0x000000010b031893 in llvm::DenseMapBase<llvm::<u></u>SmallDenseMap<void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long>, 4u, llvm::DenseMapInfo<void*>, llvm::detail::DenseMapPair<<u></u>void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long> > >, void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long>, llvm::DenseMapInfo<void*>, llvm::detail::DenseMapPair<<u></u>void*, std::__1::pair<llvm::<u></u>PointerUnion<llvm::<u></u>MetadataAsValue*, llvm::Metadata*>, unsigned long long> > >::erase(void* const&) at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/ADT/DenseMap.h:200<br>
> #3 0x000000010b022e7a in llvm::ReplaceableMetadataImpl:<u></u>:dropRef(void*) at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/lib/IR/<u></u>Metadata.cpp:135<br>
> #4 0x000000010b0409e2 in llvm::MetadataTracking::<u></u>untrack(void*, llvm::Metadata&) at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/lib/IR/<u></u>MetadataTracking.cpp:42<br>
> #5 0x000000010afcf00c in llvm::MetadataTracking::<u></u>untrack(llvm::Metadata*&) at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/IR/MetadataTracking.h:69<br>
> #6 0x000000010afced0a in llvm::TrackingMDRef::untrack() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/IR/TrackingMDRef.h:90<br>
> #7 0x000000010afd0385 in llvm::TrackingMDRef::~<u></u>TrackingMDRef() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/IR/TrackingMDRef.h:56<br>
> #8 0x000000010afd0365 in llvm::TrackingMDRef::~<u></u>TrackingMDRef() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/IR/TrackingMDRef.h:56<br>
> #9 0x00000001092ba55e in llvm::DenseMapBase<llvm::<u></u>DenseMap<char const*, llvm::TrackingMDRef, llvm::DenseMapInfo<char const*>, llvm::detail::DenseMapPair<<u></u>char const*, llvm::TrackingMDRef> >, char const*, llvm::TrackingMDRef, llvm::DenseMapInfo<char const*>, llvm::detail::DenseMapPair<<u></u>char const*, llvm::TrackingMDRef> >::destroyAll() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/ADT/DenseMap.h:264<br>
> #10 0x00000001092ba48f in llvm::DenseMap<char const*, llvm::TrackingMDRef, llvm::DenseMapInfo<char const*>, llvm::detail::DenseMapPair<<u></u>char const*, llvm::TrackingMDRef> >::~DenseMap() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/ADT/DenseMap.h:578<br>
> #11 0x00000001092ae2a5 in llvm::DenseMap<char const*, llvm::TrackingMDRef, llvm::DenseMapInfo<char const*>, llvm::detail::DenseMapPair<<u></u>char const*, llvm::TrackingMDRef> >::~DenseMap() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/include/<u></u>llvm/ADT/DenseMap.h:577<br>
> #12 0x000000010929323b in clang::CodeGen::CGDebugInfo::~<u></u>CGDebugInfo() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/tools/<u></u>clang/lib/CodeGen/CGDebugInfo.<u></u>cpp:53<br>
> #13 0x0000000109293315 in clang::CodeGen::CGDebugInfo::~<u></u>CGDebugInfo() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/tools/<u></u>clang/lib/CodeGen/CGDebugInfo.<u></u>cpp:50<br>
> #14 0x0000000109421bca in clang::CodeGen::CodeGenModule:<u></u>:~CodeGenModule() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/tools/<u></u>clang/lib/CodeGen/<u></u>CodeGenModule.cpp:164<br>
> #15 0x0000000109422355 in clang::CodeGen::CodeGenModule:<u></u>:~CodeGenModule() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/tools/<u></u>clang/lib/CodeGen/<u></u>CodeGenModule.cpp:157<br>
> #16 0x0000000109537e36 in std::__1::default_delete<<u></u>clang::CodeGen::CodeGenModule><u></u>::operator()(clang::CodeGen::<u></u>CodeGenModule*) const [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2426<br>
> #17 0x0000000109537e0f in std::__1::unique_ptr<clang::<u></u>CodeGen::CodeGenModule, std::__1::default_delete<<u></u>clang::CodeGen::CodeGenModule> >::reset(clang::CodeGen::<u></u>CodeGenModule*) [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2625<br>
> #18 0x0000000109537d8f in std::__1::unique_ptr<clang::<u></u>CodeGen::CodeGenModule, std::__1::default_delete<<u></u>clang::CodeGen::CodeGenModule> >::~unique_ptr() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2593<br>
> #19 0x0000000109537d8f in std::__1::unique_ptr<clang::<u></u>CodeGen::CodeGenModule, std::__1::default_delete<<u></u>clang::CodeGen::CodeGenModule> >::~unique_ptr() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2593<br>
> #20 0x0000000109537d8f in (anonymous namespace)::CodeGeneratorImpl:<u></u>:~CodeGeneratorImpl() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/tools/<u></u>clang/lib/CodeGen/<u></u>ModuleBuilder.cpp:63<br>
> #21 0x0000000109536835 in (anonymous namespace)::CodeGeneratorImpl:<u></u>:~CodeGeneratorImpl() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/tools/<u></u>clang/lib/CodeGen/<u></u>ModuleBuilder.cpp:63<br>
> #22 0x0000000109536859 in (anonymous namespace)::CodeGeneratorImpl:<u></u>:~CodeGeneratorImpl() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/llvm/tools/<u></u>clang/lib/CodeGen/<u></u>ModuleBuilder.cpp:63<br>
> #23 0x000000010bd4cf05 in std::__1::default_delete<<u></u>clang::CodeGenerator>::<u></u>operator()(clang::<u></u>CodeGenerator*) const [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2426<br>
> #24 0x000000010bd4ceda in std::__1::unique_ptr<clang::<u></u>CodeGenerator, std::__1::default_delete<<u></u>clang::CodeGenerator> >::reset(clang::CodeGenerator*<u></u>) [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2625<br>
> #25 0x000000010bd4ce53 in std::__1::unique_ptr<clang::<u></u>CodeGenerator, std::__1::default_delete<<u></u>clang::CodeGenerator> >::~unique_ptr() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2593<br>
> #26 0x000000010bd4ce53 in std::__1::unique_ptr<clang::<u></u>CodeGenerator, std::__1::default_delete<<u></u>clang::CodeGenerator> >::~unique_ptr() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2593<br>
> #27 0x000000010bd4ce53 in lldb_private::<u></u>ClangExpressionParser::~<u></u>ClangExpressionParser() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/<u></u>Expression/<u></u>ClangExpressionParser.cpp:338<br>
> #28 0x000000010bd4d545 in lldb_private::<u></u>ClangExpressionParser::~<u></u>ClangExpressionParser() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/<u></u>Expression/<u></u>ClangExpressionParser.cpp:337<br>
> #29 0x000000010bd2ce7f in std::__1::default_delete<lldb_<u></u>private::<u></u>ClangExpressionParser>::<u></u>operator()(lldb_private::<u></u>ClangExpressionParser*) const [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2426<br>
> #30 0x000000010bd2ce58 in std::__1::unique_ptr<lldb_<u></u>private::<u></u>ClangExpressionParser, std::__1::default_delete<lldb_<u></u>private::<u></u>ClangExpressionParser> >::reset(lldb_private::<u></u>ClangExpressionParser*) [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2625<br>
> #31 0x000000010bd2cdd8 in std::__1::unique_ptr<lldb_<u></u>private::<u></u>ClangExpressionParser, std::__1::default_delete<lldb_<u></u>private::<u></u>ClangExpressionParser> >::~unique_ptr() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2593<br>
> #32 0x000000010bd2cdd8 in std::__1::unique_ptr<lldb_<u></u>private::ASTStructExtractor, std::__1::default_delete<lldb_<u></u>private::ASTStructExtractor> >::~unique_ptr() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2593<br>
> #33 0x000000010bd2cdd8 in lldb_private::ClangFunction::~<u></u>ClangFunction() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/<u></u>Expression/ClangFunction.cpp:<u></u>118<br>
> #34 0x000000010bd2ced5 in lldb_private::ClangFunction::~<u></u>ClangFunction() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/<u></u>Expression/ClangFunction.cpp:<u></u>110<br>
> #35 0x000000010bd2cef9 in lldb_private::ClangFunction::~<u></u>ClangFunction() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/<u></u>Expression/ClangFunction.cpp:<u></u>110<br>
> #36 0x000000010c38f1ff in std::__1::default_delete<lldb_<u></u>private::ClangFunction>::<u></u>operator()(lldb_private::<u></u>ClangFunction*) const [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2426<br>
> #37 0x000000010c38f1d4 in std::__1::unique_ptr<lldb_<u></u>private::ClangFunction, std::__1::default_delete<lldb_<u></u>private::ClangFunction> >::reset(lldb_private::<u></u>ClangFunction*) [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2625<br>
> #38 0x000000010c38f154 in std::__1::unique_ptr<lldb_<u></u>private::ClangFunction, std::__1::default_delete<lldb_<u></u>private::ClangFunction> >::~unique_ptr() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2593<br>
> #39 0x000000010c38f154 in std::__1::unique_ptr<lldb_<u></u>private::AppleObjCRuntimeV2::<u></u>TaggedPointerVendor, std::__1::default_delete<lldb_<u></u>private::AppleObjCRuntimeV2::<u></u>TaggedPointerVendor> >::~unique_ptr() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2593<br>
> #40 0x000000010c38f154 in lldb_private::<u></u>AppleObjCRuntimeV2::~<u></u>AppleObjCRuntimeV2() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/Plugins/<u></u>LanguageRuntime/ObjC/<u></u>AppleObjCRuntime/<u></u>AppleObjCRuntimeV2.cpp:365<br>
> #41 0x000000010c38f405 in lldb_private::<u></u>AppleObjCRuntimeV2::~<u></u>AppleObjCRuntimeV2() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/Plugins/<u></u>LanguageRuntime/ObjC/<u></u>AppleObjCRuntime/<u></u>AppleObjCRuntimeV2.cpp:364<br>
> #42 0x000000010c38f429 in lldb_private::<u></u>AppleObjCRuntimeV2::~<u></u>AppleObjCRuntimeV2() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/Plugins/<u></u>LanguageRuntime/ObjC/<u></u>AppleObjCRuntime/<u></u>AppleObjCRuntimeV2.cpp:364<br>
> #43 0x000000010c1cc07c in std::__1::default_delete<lldb_<u></u>private::LanguageRuntime>::<u></u>operator()(lldb_private::<u></u>LanguageRuntime*) const [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:2426<br>
> #44 0x000000010c1cc051 in std::__1::__shared_ptr_<u></u>pointer<lldb_private::<u></u>LanguageRuntime*, std::__1::default_delete<lldb_<u></u>private::LanguageRuntime>, std::__1::allocator<lldb_<u></u>private::LanguageRuntime> >::__on_zero_shared() at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:3669<br>
> #45 0x00007fff92b9d8a6 in std::__1::__shared_weak_count:<u></u>:__release_shared() ()<br>
> #46 0x000000010c1cb90f in std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime>::~<u></u>shared_ptr() at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:4448<br>
> #47 0x000000010c1c3925 in std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime>::~<u></u>shared_ptr() at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:4446<br>
> #48 0x000000010c1ce09c in std::__1::pair<lldb::<u></u>LanguageType const, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >::~pair() at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/utility:248<br>
> #49 0x000000010c1ce075 in std::__1::pair<lldb::<u></u>LanguageType const, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >::~pair() at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/utility:248<br>
> #50 0x000000010c1cdff9 in std::__1::__value_type<lldb::<u></u>LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >::~__value_type() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/map:617<br>
> #51 0x000000010c1cdff1 in std::__1::__value_type<lldb::<u></u>LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >::~__value_type() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/map:617<br>
> #52 0x000000010c1cdff1 in void std::__1::allocator_traits<<u></u>std::__1::allocator<std::__1::<u></u>__tree_node<std::__1::__value_<u></u>type<lldb::LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >, void*> > >::__destroy<std::__1::__<u></u>value_type<lldb::LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> > >(std::__1::integral_constant<<u></u>bool, false>, std::__1::allocator<std::__1::<u></u>__tree_node<std::__1::__value_<u></u>type<lldb::LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >, void*> >&, std::__1::__value_type<lldb::<u></u>LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >*) [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:1585<br>
> #53 0x000000010c1cdfdd in void std::__1::allocator_traits<<u></u>std::__1::allocator<std::__1::<u></u>__tree_node<std::__1::__value_<u></u>type<lldb::LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >, void*> > >::destroy<std::__1::__value_<u></u>type<lldb::LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> > >(std::__1::allocator<std::__<u></u>1::__tree_node<std::__1::__<u></u>value_type<lldb::LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >, void*> >&, std::__1::__value_type<lldb::<u></u>LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >*) [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/memory:1483<br>
> #54 0x000000010c1cdfcd in std::__1::__tree<std::__1::__<u></u>value_type<lldb::LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >, std::__1::__map_value_compare<<u></u>lldb::LanguageType, std::__1::__value_type<lldb::<u></u>LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >, std::__1::less<lldb::<u></u>LanguageType>, true>, std::__1::allocator<std::__1::<u></u>__value_type<lldb::<u></u>LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> > > >::destroy(std::__1::__tree_<u></u>node<std::__1::__value_type<<u></u>lldb::LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >, void*>*) at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/__tree:1445<br>
> #55 0x000000010c1cde69 in std::__1::__tree<std::__1::__<u></u>value_type<lldb::LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >, std::__1::__map_value_compare<<u></u>lldb::LanguageType, std::__1::__value_type<lldb::<u></u>LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> >, std::__1::less<lldb::<u></u>LanguageType>, true>, std::__1::allocator<std::__1::<u></u>__value_type<lldb::<u></u>LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> > > >::clear() at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/__tree:1477<br>
> #56 0x000000010c19ea1c in std::__1::map<lldb::<u></u>LanguageType, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime>, std::__1::less<lldb::<u></u>LanguageType>, std::__1::allocator<std::__1::<u></u>pair<lldb::LanguageType const, std::__1::shared_ptr<lldb_<u></u>private::LanguageRuntime> > > >::clear() [inlined] at /Applications/Xcode.app/<u></u>Contents/Developer/Toolchains/<u></u>OSX10.10.xctoolchain/usr/bin/.<u></u>./include/c++/v1/map:1073<br>
> #57 0x000000010c19ea17 in lldb_private::Process::<u></u>Finalize() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/Target/<u></u>Process.cpp:846<br>
> #58 0x000000010bb7ab0b in lldb_private::Debugger::Clear(<u></u>) at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/Core/<u></u>Debugger.cpp:722<br>
> #59 0x000000010bb7a0e6 in lldb_private::Debugger::<u></u>Destroy(std::__1::shared_ptr<<u></u>lldb_private::Debugger>&) at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/Core/<u></u>Debugger.cpp:571<br>
> #60 0x0000000108a5a341 in lldb::SBDebugger::Destroy(<u></u>lldb::SBDebugger&) at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/source/API/<u></u>SBDebugger.cpp:213<br>
> #61 0x00000001089e1084 in Driver::MainLoop() at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/tools/driver/<u></u>Driver.cpp:1157<br>
> #62 0x00000001089e16ab in main at /Volumes/Lachesis/Software/<u></u>lldb-svn/lldb/tools/driver/<u></u>Driver.cpp:1251<br>
> #63 0x00000001089d9da4 in start ()<br>
> –<br>
> Sean<br>
><br>
>> On Dec 9, 2014, at 3:04 PM, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
>><br>
>> I filed the bug anyway, can't hurt to try reproducing on other platforms.<br>
>><br>
>> On Tue Dec 09 2014 at 2:56:24 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br>
>> Ah. No :/.<br>
>><br>
>><br>
>> > On 2014 Dec 9, at 14:55, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
>> ><br>
>> > Do you have access to a Windows machien to test on? I suspect it's going to require Windows to reproduce.<br>
>> ><br>
>> > On Tue Dec 09 2014 at 2:54:44 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br>
>> > Weird, it passed an LTO bootstrap for me.<br>
>> ><br>
>> > Is it possible to file a PR with a testcase? I'll look at it right<br>
>> > away.<br>
>> ><br>
>> > > On 2014 Dec 9, at 14:50, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
>> > ><br>
>> > > Just an additional heads up that there may be some runtime issues with the patch as well.<br>
>> > ><br>
>> > > Running this command:<br>
>> > > d:\src\llvm\build\ninja\bin\<u></u>clang++.exe -std=c++11 -g -O0 -m32 -Id:/src/llvm/tools/lldb/test/<u></u>make/../../include -fno-exceptions -include d:/src/llvm/tools/lldb/test/<u></u>make/uncaught_exception.h -D_HAS_EXCEPTIONS=0 -O0 -c -o main.o main.cpp<br>
>> > ><br>
>> > > Results in this:<br>
>> > ><br>
>> > > Stack dump:<br>
>> > > 0. Program arguments: d:\src\llvm\build\ninja\bin\<u></u>clang++.exe -cc1 -triple i686-pc-windows-msvc -emit-obj -mrelax-all -disable-free -main-file-name main.cpp -mrelocation-model static -mthread-model posix -mdisable-fp-elim -fmath-errno -masm-verbose -mconstructor-aliases -target-cpu pentium4 -g<br>
>> > > -dwarf-column-info -coverage-file d:\src\llvm\tools\lldb\test\<u></u>functionalities\data-<u></u>formatter\data-formatter-stl\<u></u>libcxx\vbool\main.o -resource-dir d:\src\llvm\build\ninja\bin\..<u></u>\lib\clang\3.6.0 -include d:/src/llvm/tools/lldb/test/<u></u>make/uncaught_exception.h -D _HAS_EXCEPTIONS=0 -I d:/src/llvm/tools/ll<br>
>> > > db/test/make/../../include -internal-isystem d:\src\llvm\build\ninja\bin\..<u></u>\lib\clang\3.6.0\include -internal-isystem C:\Program Files (x86)\Microsoft Visual Studio 12.0\VC\include -internal-isystem C:\Program Files (x86)\Windows Kits\8.1\include\shared -internal-isystem C:\Program Files (x86)\Windo<br>
>> > > ws Kits\8.1\include\um -internal-isystem C:\Program Files (x86)\Windows Kits\8.1\include\winrt -O0 -std=c++11 -fdeprecated-macro -fdebug-compilation-dir d:\src\llvm\tools\lldb\test\<u></u>functionalities\data-<u></u>formatter\data-formatter-stl\<u></u>libcxx\vbool -ferror-limit 19 -fmessage-length 300 -mstackrealign -fm<br>
>> > > s-extensions -fms-compatibility -fms-compatibility-version=17.<u></u>00 -fdelayed-template-parsing -fobjc-runtime=gcc -fdiagnostics-show-option -fcolor-diagnostics -o main.o -x c++ main.cpp<br>
>> > > 1. <eof> parser at end of file<br>
>> > > 2. Per-file LLVM IR generation<br>
>> > > 0x578AAA3B (0x07C903C4 0x07C903E4 0x07C903E4 0x05D8E590), ??3@YAXPAX@Z() + 0xAB bytes(s)<br>
>> > > 0x01242744 (0x07C903E4 0x07C903E4 0x05D8E5AC 0x01242B8A), llvm::MDNode::operator delete() + 0x34 bytes(s), d:\src\llvm\lib\ir\metadata.<u></u>cpp, line 388 + 0x14 byte(s)<br>
>> > > 0x0124D367 (0x00000001 0x00000000 0xCCCCCCCC 0x07C903E4), llvm::MDNodeFwdDecl::`scalar deleting destructor'() + 0x27 bytes(s)<br>
>> > > 0x01242B8A (0x07C903E4 0x05D8E788 0x05D8E7FC 0xCCCCCCCC), llvm::MDNode::deleteTemporary(<u></u>) + 0x8A bytes(s), d:\src\llvm\lib\ir\metadata.<u></u>cpp, line 591 + 0x25 byte(s)<br>
>> > > 0x01148933 (0x06150E78 0x07C903E4 0x05D8E7E4 0x05D8E7FC), llvm::DIDescriptor::<u></u>replaceAllUsesWith() + 0x123 bytes(s), d:\src\llvm\lib\ir\debuginfo.<u></u>cpp, line 342 + 0x9 byte(s)<br>
>> > > 0x01C824B7 (0x05D8E848 0x05D8E7FC 0xCCCCCCCC 0xCCCCCCCC), clang::CodeGen::CGDebugInfo::<u></u>finalize() + 0x2A7 bytes(s), d:\src\llvm\tools\clang\lib\<u></u>codegen\cgdebuginfo.cpp, line 3390<br>
>> > > 0x01C112BB (0x0618BE90 0x05D8E848 0x01BEFB40 0x0617DDE0), clang::CodeGen::CodeGenModule:<u></u>:Release() + 0x3CB bytes(s), d:\src\llvm\tools\clang\lib\<u></u>codegen\codegenmodule.cpp, line 415<br>
>> > > 0x01C0E576 (0x0617DDE0 0x05D8E8D0 0x05D8E854 0xCCCCCCCC), `anonymous namespace'::CodeGeneratorImpl:<u></u>:HandleTranslationUnit() + 0x86 bytes(s), d:\src\llvm\tools\clang\lib\<u></u>codegen\modulebuilder.cpp, line 198<br>
>> > > 0x01BEFB40 (0x0617DDE0 0x05D8EAD0 0x05D8E8E0 0x061B8890), clang::BackendConsumer::<u></u>HandleTranslationUnit() + 0x60 bytes(s), d:\src\llvm\tools\clang\lib\<u></u>codegen\codegenaction.cpp, line 131 + 0x21 byte(s)<br>
>> > > 0x025B1717 (0x061A2460 0x00000000 0x00000000 0x05D8EAD8), clang::ParseAST() + 0x237 bytes(s), d:\src\llvm\tools\clang\lib\<u></u>parse\parseast.cpp, line 154 + 0x18 byte(s)<br>
>> > > 0x018BF641 (0x05D8EB54 0x05D8EAD8 0xCCCCCCCC 0xCCCCCCCC), clang::ASTFrontendAction::<u></u>ExecuteAction() + 0x101 bytes(s), d:\src\llvm\tools\clang\lib\<u></u>frontend\frontendaction.cpp, line 527 + 0x30 byte(s)<br>
>> > > 0x01BEC33F (0x05D8EB00 0xCCCCCCCC 0xCCCCCCCC 0xCCCCCCCC), clang::CodeGenAction::<u></u>ExecuteAction() + 0x3CF bytes(s), d:\src\llvm\tools\clang\lib\<u></u>codegen\codegenaction.cpp, line 729<br>
>> > > 0x018BF22E (0x05D8EBF8 0x00000000 0xCCCCCCCC 0xCCCCCCCC), clang::FrontendAction::<u></u>Execute() + 0x7E bytes(s), d:\src\llvm\tools\clang\lib\<u></u>frontend\frontendaction.cpp, line 428 + 0xF byte(s)<br>
>> > > 0x0187A821 (0x06158390 0x05D8F100 0x00000000 0xCCCCCCCC), clang::CompilerInstance::<u></u>ExecuteAction() + 0x2A1 bytes(s), d:\src\llvm\tools\clang\lib\<u></u>frontend\compilerinstance.cpp, line 812<br>
>> > > 0x019CDDBE (0x06152A98 0x05D8FEC8 0xCCCCCCCC 0xCCCCCCCC), clang::<u></u>ExecuteCompilerInvocation() + 0x30E bytes(s), d:\src\llvm\tools\clang\lib\<u></u>frontendtool\<u></u>executecompilerinvocation.cpp, line 222 + 0x11 byte(s)<br>
>> > > 0x0041461F (0x05D8FAB0 0x0000003D 0x06155AD0 0x0035139D), cc1_main() + 0x2FF bytes(s), d:\src\llvm\tools\clang\tools\<u></u>driver\cc1_main.cpp, line 110 + 0xE byte(s)<br>
>> > > 0x003FFC18 (0x05D8FAA8 0x0000003F 0x06155AFC 0x00000000), ExecuteCC1Tool() + 0x78 bytes(s), d:\src\llvm\tools\clang\tools\<u></u>driver\driver.cpp, line 369 + 0x2B byte(s)<br>
>> > > 0x003FFFB5 (0x0000003F 0x061519E8 0x06145120 0x5DB515C0), main() + 0x2F5 bytes(s), d:\src\llvm\tools\clang\tools\<u></u>driver\driver.cpp, line 415 + 0x33 byte(s)<br>
>> > > 0x034BDA89 (0x05D8FF2C 0x75CC919F 0x7EDD4000 0x05D8FF70), __tmainCRTStartup() + 0x199 bytes(s), f:\dd\vctools\crt\crtw32\<u></u>dllstuff\crtexe.c, line 626 + 0x19 byte(s)<br>
>> > > 0x034BDBCD (0x7EDD4000 0x05D8FF70 0x77A40BBB 0x7EDD4000), mainCRTStartup() + 0xD bytes(s), f:\dd\vctools\crt\crtw32\<u></u>dllstuff\crtexe.c, line 466<br>
>> > > 0x75CC919F (0x7EDD4000 0x2F016EAA 0x00000000 0x00000000), BaseThreadInitThunk() + 0xE bytes(s)<br>
>> > > 0x77A40BBB (0xFFFFFFFF 0x77A2C9D1 0x00000000 0x00000000), RtlInitializeExceptionChain() + 0x84 bytes(s)<br>
>> > > 0x77A40B91 (0x034BDBC0 0x7EDD4000 0x00000000 0x00000000), RtlInitializeExceptionChain() + 0x5A bytes(s)<br>
>> > > ^C<br>
>> > > d:\src\llvm\tools\lldb\test\<u></u>functionalities\data-<u></u>formatter\data-formatter-stl\<u></u>libcxx\vbool><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > ><br>
>> > > On Tue Dec 09 2014 at 2:41:09 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br>
>> > > Awesome, thanks for the help!<br>
>> > ><br>
>> > > > On 2014 Dec 9, at 14:28, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
>> > > ><br>
>> > > > This fixes the issue. I will check in your patch. Thanks!<br>
>> > > ><br>
>> > > > On Tue Dec 09 2014 at 2:20:02 PM Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
>> > > > Testing now. I notice a few of the changes aren't actually required in order to fix compiler errors. For example, this line:<br>
>> > > ><br>
>> > > > - ConstantInt *constant_int = dyn_cast<ConstantInt>(alloc_<u></u>md->getOperand(0));<br>
>> > > > + ConstantInt *constant_int = mdconst::dyn_extract<<u></u>ConstantInt>(alloc_md-><u></u>getOperand(0));<br>
>> > > ><br>
>> > > > wasn't actually failing. Not sure if that's important, but I'm using your fixed version anyway.<br>
>> > > ><br>
>> > > > On Tue Dec 09 2014 at 2:11:08 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br>
>> > > > Attaching a patch that should fix it. Can you try compiling?<br>
>> > > ><br>
>> > > ><br>
>> > > ><br>
>> > > ><br>
>> > > > > On 2014 Dec 9, at 14:03, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
>> > > > ><br>
>> > > > > Here's the 3 errors.<br>
>> > > > ><br>
>> > > > > ..\..\tools\lldb\source\<u></u>Expression\IRForTarget.cpp(<u></u>413) : error C2678: binary '!=' : no operator found which takes a left-hand operand of type 'const llvm::MDOperand' (or there is no acceptable conversion)<br>
>> > > > > d:\src\llvm\include\llvm/ADT/<u></u>APSInt.h(291): could be 'bool llvm::operator !=(int64_t,const llvm::APSInt &)'<br>
>> > > > > d:\src\llvm\include\llvm/ADT/<u></u>APInt.h(1724): or 'bool llvm::operator !=(uint64_t,const llvm::APInt &)'<br>
>> > > > > d:\src\llvm\include\llvm/ADT/<u></u>StringRef.h(527): or 'bool llvm::operator !=(llvm::StringRef,llvm::<u></u>StringRef)'<br>
>> > > > > while trying to match the argument list '(const llvm::MDOperand, const llvm::GlobalValue *)'<br>
>> > > > ><br>
>> > > > ><br>
>> > > > ><br>
>> > > > > ..\..\tools\lldb\source\<u></u>Expression\IRForTarget.cpp(<u></u>647) : error C2664: 'llvm::MDNode *llvm::MDNode::get(llvm::<u></u>LLVMContext &,llvm::ArrayRef<llvm::<u></u>Metadata *>)' : cannot convert argument 2 from 'llvm::ArrayRef<llvm::Value *>' to 'llvm::ArrayRef<llvm::Metadata *>'<br>
>> > > > > No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called<br>
>> > > > ><br>
>> > > > ><br>
>> > > > > ..\..\tools\lldb\source\<u></u>Expression\IRForTarget.cpp(<u></u>1254) : error C2664: 'llvm::MDNode *llvm::MDNode::get(llvm::<u></u>LLVMContext &,llvm::ArrayRef<llvm::<u></u>Metadata *>)' : cannot convert argument 2 from 'llvm::ArrayRef<llvm::Value *>' to 'llvm::ArrayRef<llvm::Metadata *>'<br>
>> > > > > No user-defined-conversion operator available that can perform this conversion, or the operator cannot be called<br>
>> > > > ><br>
>> > > > ><br>
>> > > > > On Tue Dec 09 2014 at 1:56:03 PM Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
>> > > > > I'm not sure what the status of building LLDB with CMake is, but the normal way apple people build LLDB is to structure the directory like this:<br>
>> > > > ><br>
>> > > > > lldb<br>
>> > > > > --llvm<br>
>> > > > > ----tools<br>
>> > > > > ------clang<br>
>> > > > ><br>
>> > > > > Then open the xcode workspace and build the lldb-tool target.<br>
>> > > > ><br>
>> > > > > I'll sync to ToT again though so that I can get you a dump of the compiler errors I'm seeing.<br>
>> > > > ><br>
>> > > > > On Tue Dec 09 2014 at 1:52:40 PM Duncan P. N. Exon Smith <<a href="mailto:dexonsmith@apple.com" target="_blank">dexonsmith@apple.com</a>> wrote:<br>
>> > > > > I'm trying to build lldb now, but it's hung trying to build LLVM and<br>
>> > > > > clang... but I already built these? I don't really understand.<br>
>> > > > ><br>
>> > > > > Is there any way to make lldb point to my LLVM checkout? I just want to<br>
>> > > > > see the compiler errors so I can fix them :(.<br>
>> > > > ><br>
>> > > > > Alternatively, if some can email me a compile log with all the errors<br>
>> > > > > (can you do a `make -k` or something?) I can send you a patch... this is<br>
>> > > > > mechanical to update, but I need the compiler to tell me what's wrong.<br>
>> > > > ><br>
>> > > > > I expect the fixes to all be along these lines:<br>
>> > > > ><br>
>> > > > > - Value *Ops[] => Metadata *Ops[]<br>
>> > > > ><br>
>> > > > > - cast<ConstantInt>(N-><u></u>getOperand(0)) =><br>
>> > > > > mdconst::extract<ConstantInt>(<u></u>N->getOperand(0))<br>
>> > > > ><br>
>> > > > > - Value *Op = ConstantInt::get(...) =><br>
>> > > > > Metadata *Op = ConstantAsMetadata::get(<u></u>ConstantInt::get(...))<br>
>> > > > ><br>
>> > > > > Sorry for the breakage :(.<br>
>> > > > ><br>
>> > > > > > On 2014 Dec 9, at 13:41, Zachary Turner <<a href="mailto:zturner@google.com" target="_blank">zturner@google.com</a>> wrote:<br>
>> > > > > ><br>
>> > > > > > If you sync llvm past git revision db7b69e3a634c5fdff0eceeee2a41e<u></u>e49c3270a2 (svn r223802), your LLDB build will be broken.<br>
>> > > > > ><br>
>> > > > > > I was able to fix one of the errors, but this isn't really my area of expertise, so I stopped when I realized I didn't know what I was doing.<br>
>> > > > > ><br>
>> > > > > > Just a warning not to sync LLVM until this is fixed. I've CC'ed Sean and Duncan as they are probably the best people to fix this, but if anyone else knows how to fix it, feel free.<br>
>> > > > ><br>
>> > > ><br>
>> > ><br>
>> ><br>
>><br>
><br>
<br>
</blockquote></div>