id summary reporter owner description type status milestone component version severity resolution keywords cc 10180 shared_memory_object assertion when used with boost unit test andrew.lang@… Ion Gaztañaga "I am running with Visual Studio 2010, and boost 1.55. When I run a simple unit test with shared_memory_object, I get an assertion on shutdown. The test itself creates a shared memory object, maps it to memory, and writes to it; it then opens a shared memory object of the same name and reads from it. This works fine. On exit, the fini_atomic_func functor in intermodule_singleton_common is run to clean up. This does the following: {{{ ref_count_ptr *rcount = intermodule_singleton_helpers::thread_safe_global_map_dependant ::find(m_map, typeid(C).name()); //The object must exist BOOST_ASSERT(rcount); }}} The assertion fails. In the debugger I can see that typeid(C).name() has returned a rubbish string, and therefore no map entry is found. When that same code is executed in init_atomic_func, typeid(C).name() returns ""struct boost::interprocess::ipcdetail::windows_bootstamp"" as expected. Following the relevant memory address in the debugger, I see that the typeid string is erased in the unit test's framework::shutdown() function. This is done deliberately to eliminate fake memory leak reports from the typeid strings. See boost\test\impl\framework.ipp. Unfortunately the interprocess cleanup is done via a handler registered with std::atexit, which guarantees it will be after framework has run shutdown. I don't see any options on either side (boost unit test or boost interprocess) which would allow the order to be fixed up. Simplest code to reproduce: {{{ #include #include namespace IP = boost::interprocess; BOOST_AUTO_TEST_SUITE( TestSharedMemory ) BOOST_AUTO_TEST_CASE( CauseAssertionFailure ) { IP::shared_memory_object lShared( IP::open_only, ""test_string"", IP::read_only ); BOOST_REQUIRE( lShared.get_name() != 0 ); } BOOST_AUTO_TEST_SUITE_END() }}}" Bugs new To Be Determined interprocess Boost 1.55.0 Problem