id summary reporter owner description type status milestone component version severity resolution keywords cc 11053 The attached code results in a R6025 - pure virtual function call in run_thread_exit_callbacks swebb3@… viboes "Caused when deallocating a thread specific pointer in a object that is inside thread specific data. I suggest changing the code in run_thread_exit_callbacks from {{{ for(std::map::iterator next=current_thread_data->tss_data.begin(), current, end=current_thread_data->tss_data.end(); next!=end;) { current=next; ++next; if(current->second.func && (current->second.value!=0)) { (*current->second.func)(current->second.value); } current_thread_data->tss_data.erase(current); } }}} to {{{ while (!current_thread_data->tss_data.empty()) { std::map::iterator current = current_thread_data->tss_data.begin(); if(current->second.func && (current->second.value!=0)) { (*current->second.func)(current->second.value); } current_thread_data->tss_data.erase(current); } }}} Code to reproduce the problem: {{{ #include #include #include #include struct A { void DoWork() { std::cout << ""A: doing work\n""; if (!m_ptr.get()) m_ptr.reset(new WorkSpace()); // do not very much for (size_t i = 0; i < 10; ++i) m_ptr->a += 10; } private: struct WorkSpace { int a; WorkSpace() : a(0) {} }; boost::thread_specific_ptr m_ptr; }; struct B { void DoWork() { std::cout << ""B: doing work\n""; if (!m_ptr.get()) m_ptr.reset(new A()); m_ptr->DoWork(); } private: boost::thread_specific_ptr m_ptr; }; struct C { void DoWork() { std::cout << ""C: doing work\n""; if (!m_ptr.get()) m_ptr.reset(new B()); m_ptr->DoWork(); } private: boost::thread_specific_ptr m_ptr; }; int main(int ac, char** av) { std::cout << ""test starting\n""; boost::shared_ptr p_C(new C); boost::thread cWorker(&C::DoWork, p_C); cWorker.join(); std::cout << ""test stopping\n""; } }}} Compiler visual studio 2012 " Bugs closed Boost 1.58.0 thread Boost 1.55.0 Problem fixed