On Sat, Oct 15, 2011 at 9:49 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com">chandlerc@google.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im"><div class="gmail_quote">On Sat, Oct 15, 2011 at 9:20 PM, Talin <span dir="ltr"><<a href="mailto:viridia@gmail.com" target="_blank">viridia@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div>I recently updated my version of LLVM from revision 140108 to 142082, and several things broke, most of which were easily fixed. However, I'm now getting a "pure virtual method called" exception (__cxa_pure_virtual) which I wasn't getting before. This is happening in the destructor of a statically-initialized object. (More precisely, it's blowing up in a BumpPtrAllocator, which is used by a StringMap, which is in turn a member of a statically initialized object.)<div>
<br></div><div>Anyone know what might have changed recently that would cause this?</div></div></blockquote></div><br></div><div>It would help a lot to see the actual backtrace etc. ;]</div>
</blockquote></div><br>Sure thing (although I'm not sure that this will tell you all that much):<div><br></div><div><div>#0 0x00007fff878d8fbb in __cxa_pure_virtual ()</div><div>#1 0x0000000100f3f166 in llvm::BumpPtrAllocator::DeallocateSlabs (this=0x1016e48a8, Slab=0x103889e00) at /Users/talin/Projects/llvm/lib/Support/Allocator.cpp:71</div>
<div>#2 0x0000000100f3f0b9 in llvm::BumpPtrAllocator::~BumpPtrAllocator (this=0x1016e48a8) at /Users/talin/Projects/llvm/lib/Support/Allocator.cpp:29</div><div>#3 0x0000000100f3f095 in llvm::BumpPtrAllocator::~BumpPtrAllocator (this=0x1016e48a8) at /Users/talin/Projects/llvm/lib/Support/Allocator.cpp:28</div>
<div>#4 0x00000001000aeb3a in llvm::StringMap<llvm::SmallVector<tart::Defn*, 4u>, llvm::BumpPtrAllocator>::~StringMap (this=0x1016e4890) at StringMap.h:406</div><div>#5 0x00000001000aeaa5 in llvm::StringMap<llvm::SmallVector<tart::Defn*, 4u>, llvm::BumpPtrAllocator>::~StringMap (this=0x1016e4890) at StringMap.h:403</div>
<div>#6 0x00000001000aea7c in tart::SymbolTable::~SymbolTable (this=0x1016e4888) at SymbolTable.h:34</div><div>#7 0x00000001000aea45 in tart::OrderedSymbolTable::~OrderedSymbolTable (this=0x1016e4888) at SymbolTable.h:74</div>
<div>#8 0x00000001000aea15 in tart::OrderedSymbolTable::~OrderedSymbolTable (this=0x1016e4888) at SymbolTable.h:74</div><div>#9 0x00000001000ae809 in tart::IterableScope::~IterableScope (this=0x1016e4880) at Scope.h:76</div>
<div>#10 0x00000001001e22d5 in tart::IterableScope::~IterableScope (this=0x1016e4880) at Scope.h:76</div><div>#11 0x00000001001e2267 in tart::FunctionDefn::~FunctionDefn (this=0x1016e4710) at FunctionDefn.h:103</div><div>
#12 0x00000001000cf821 in ~IntegerBinOpFunction (this=0x1016e4710) at /Users/talin/Projects/tart/trunk/compiler/lib/Objects/Operators.cpp:56</div><div>#13 0x00000001000c1f65 in ~IntegerBinOpFunction (this=0x1016e4710) at /Users/talin/Projects/tart/trunk/compiler/lib/Objects/Operators.cpp:54</div>
<div>#14 0x00007fff830e6374 in __cxa_finalize ()</div><div>#15 0x00007fff830e628c in exit ()</div><div>#16 0x0000000100001a3b in start ()</div><div><br></div><div>I would generally expect this kind of "pure virtual" error to be the result of double-destruction - the first destruction having swizzled the vtable pointer of the object in question. But my debugging of the code shows no evidence of this. So I'm not sure what's going on.</div>
<div><br></div><div>-- </div>-- Talin<br>
</div>