Interestingly, I also get a similar error in a different executable (my unittest):<div><br></div><div><div>pure virtual method called</div><div>terminate called without an active exception</div><div>0  tartc             0x00000001010a8265 PrintStackTrace(void*) + 53</div>

<div>1  tartc             0x00000001010a88cc SignalHandler(int) + 364</div><div>2  libSystem.B.dylib 0x00007fff831341ba _sigtramp + 26</div><div>3  libSystem.B.dylib 0x7261742e65637365 _sigtramp + 3796906437</div><div>4  libstdc++.6.dylib 0x00007fff878da5d2 __tcf_0 + 0</div>

<div>5  libstdc++.6.dylib 0x00007fff878d8ae1 __cxxabiv1::__terminate(void (*)()) + 11</div><div>6  libstdc++.6.dylib 0x00007fff878d8b16 __cxxabiv1::__unexpected(void (*)()) + 0</div><div>7  libstdc++.6.dylib 0x00007fff878d8fd6 std::bad_cast::what() const + 0</div>

<div>8  tartc             0x000000010106ad46 llvm::BumpPtrAllocator::DeallocateSlabs(llvm::MemSlab*) + 166</div><div>9  tartc             0x000000010106ac99 llvm::BumpPtrAllocator::~BumpPtrAllocator() + 25</div><div>10 tartc             0x000000010106ac75 llvm::BumpPtrAllocator::~BumpPtrAllocator() + 21</div>

<div>11 tartc             0x00000001000388b6 llvm::StringMap<char, llvm::BumpPtrAllocator>::~StringMap() + 74</div><div>12 tartc             0x0000000100101224 tart::StringTable::~StringTable() + 24</div><div>13 tartc             0x0000000100101905 tart::Module::~Module() + 1609</div>

<div>14 tartc             0x00000001000fd67b __tcf_3 + 27</div><div>15 libSystem.B.dylib 0x00007fff830e6374 __cxa_finalize + 203</div><div>16 libSystem.B.dylib 0x00007fff830e628c exit + 18</div><div>17 tartc             0x000000010000173b start + 59</div>

<div>/</div><br><div class="gmail_quote">On Sat, Oct 15, 2011 at 11:19 PM, Talin <span dir="ltr"><<a href="mailto:viridia@gmail.com">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><div></div><div class="h5">On Sat, Oct 15, 2011 at 9:49 PM, Chandler Carruth <span dir="ltr"><<a href="mailto:chandlerc@google.com" target="_blank">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><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></div></div>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><font color="#888888"><div>-- </div>-- Talin<br>
</font></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br>-- Talin<br>
</div>