Boost logo

Boost Users :

From: Peter Dimov (pdimov_at_[hidden])
Date: 2007-04-10 10:08:04


Johan Nilsson wrote:

> Context::MapPtrT Context::g_pCtxMap(&Context::Cleanup);

What is MapPtrT?

> C++ oasistest.exe!boost::detail::tss::cleanup() + 0x78 bytes C++
> oasistest.exe!boost::thread_specific_ptr<boost::shared_ptr<RCF::Session>
>>> :~thread_specific_ptr<boost::shared_ptr<RCF::Session> >() Line 90
>>> + 0x5e
> bytes C++
> oasistest.exe!`dynamic atexit destructor for
> 'oasis::utility::Context::g_pCtxMap''() + 0xe bytes C++
> msvcr80.dll!doexit(int code=0, int quick=0, int retcaller=0) Line
> 553 C msvcr80.dll!exit(int code=0) Line 398 + 0xd bytes C
> oasistest.exe!__tmainCRTStartup() Line 603 C
> kernel32.dll!7c816fd7()

It seems that the static destructors are being run after on_thread_exit for
the main thread; that's pretty odd. I see some logic in tss.cpp that looks
like it should handle the case of ordering/race issues between
~thread_specific_ptr and the thread exit cleanup, but the code is too
complicated to tell. Maybe you need to instrument tss.cpp and tss_hooks.cpp
to see what is being called and when.


Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net