Modify

Ticket #6398 (reopened Bugs)

Opened 2 years ago

Last modified 14 months ago

intermodule_singleton crash in Windows

Reported by: joaquin Owned by: igaztanaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.48.0 Severity: Regression
Keywords: Cc:

Description

Steps to reproduce the problem:

  • Create singleton_dll.dll.
  • Create singleton_exe.exe, which uses singleton_dll.dll.
  • Run. On exit, an access violation happens.

Seemingly, the problem happens when two different singletons are created, one in the main executable and the other in a DLL. If both singletons are created in the same module everything's OK, though.

More context in  http://lists.boost.org/Archives/boost/2012/01/189577.php

Attachments

singleton.zip Download (777 bytes) - added by joaquin 2 years ago.
testcase

Change History

Changed 2 years ago by joaquin

testcase

comment:1 Changed 2 years ago by igaztanaga

  • Status changed from new to closed
  • Resolution set to fixed

(In [76576]) Fixes #6398: intermodule_singleton crash in Windows

comment:2 Changed 2 years ago by igaztanaga

Last edited 2 years ago by igaztanaga (previous) (diff)

comment:3 Changed 14 months ago by jswigart@…

This appears to still be happening in boost_1_53_0.

I have 2 dlls of the same process communicating via a message_queue

cgame_mp_x86.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,boost::interprocess::ipcdetail::ref_count_ptr,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::interprocess::ipcdetail::ref_count_ptr> >,0> >::_Root() Line 1789 + 0x3 bytes C++ cgame_mp_x86.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,boost::interprocess::ipcdetail::ref_count_ptr,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::interprocess::ipcdetail::ref_count_ptr> >,0> >::_Lbound(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Keyval) Line 1742 + 0x8 bytes C++ cgame_mp_x86.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,boost::interprocess::ipcdetail::ref_count_ptr,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::interprocess::ipcdetail::ref_count_ptr> >,0> >::lower_bound(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Keyval) Line 1450 + 0x10 bytes C++ cgame_mp_x86.dll!std::_Tree<std::_Tmap_traits<std::basic_string<char,std::char_traits<char>,std::allocator<char> >,boost::interprocess::ipcdetail::ref_count_ptr,std::less<std::basic_string<char,std::char_traits<char>,std::allocator<char> > >,std::allocator<std::pair<std::basic_string<char,std::char_traits<char>,std::allocator<char> > const ,boost::interprocess::ipcdetail::ref_count_ptr> >,0> >::find(const std::basic_string<char,std::char_traits<char>,std::allocator<char> > & _Keyval) Line 1424 + 0x10 bytes C++ cgame_mp_x86.dll!boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map::find(const char * name) Line 184 + 0x38 bytes C++ cgame_mp_x86.dll!boost::interprocess::ipcdetail::intermodule_singleton_helpers::thread_safe_global_map_dependant<boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::find(boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map & map, const char * name) Line 269 C++ cgame_mp_x86.dll!boost::interprocess::ipcdetail::intermodule_singleton_impl<boost::interprocess::ipcdetail::windows_bootstamp,1,1,boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::fini_atomic_func::operator()() Line 434 + 0x1b bytes C++ cgame_mp_x86.dll!boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map::atomic_func<boost::interprocess::ipcdetail::intermodule_singleton_impl<boost::interprocess::ipcdetail::windows_bootstamp,1,1,boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::fini_atomic_func>(boost::interprocess::ipcdetail::intermodule_singleton_impl<boost::interprocess::ipcdetail::windows_bootstamp,1,1,boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::fini_atomic_func & f) Line 213 C++ cgame_mp_x86.dll!boost::interprocess::ipcdetail::intermodule_singleton_helpers::thread_safe_global_map_dependant<boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::atomic_func<boost::interprocess::ipcdetail::intermodule_singleton_impl<boost::interprocess::ipcdetail::windows_bootstamp,1,1,boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::fini_atomic_func>(boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map & map, boost::interprocess::ipcdetail::intermodule_singleton_impl<boost::interprocess::ipcdetail::windows_bootstamp,1,1,boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::fini_atomic_func & f) Line 285 C++ cgame_mp_x86.dll!boost::interprocess::ipcdetail::intermodule_singleton_impl<boost::interprocess::ipcdetail::windows_bootstamp,1,1,boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::singleton_destructor(void * p, boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map & map) Line 472 + 0xd bytes C++ cgame_mp_x86.dll!boost::interprocess::ipcdetail::intermodule_singleton_common<boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::finalize_singleton_logic(void * & ptr, volatile unsigned int & this_module_singleton_initialized, void (void *, boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map &)* destructor) Line 182 + 0x11 bytes C++ cgame_mp_x86.dll!boost::interprocess::ipcdetail::intermodule_singleton_impl<boost::interprocess::ipcdetail::windows_bootstamp,1,1,boost::interprocess::ipcdetail::intermodule_singleton_helpers::windows_semaphore_based_map>::atexit_work() Line 340 + 0x14 bytes C++ cgame_mp_x86.dll!doexit(int code, int quick, int retcaller) Line 567 C cgame_mp_x86.dll!_cexit() Line 408 + 0xb bytes C cgame_mp_x86.dll!_CRT_INIT(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 181 C cgame_mp_x86.dll__DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 352 + 0x11 bytes C cgame_mp_x86.dll!_DllMainCRTStartup(void * hDllHandle, unsigned long dwReason, void * lpreserved) Line 293 + 0x11 bytes C

comment:4 Changed 14 months ago by anonymous

  • Status changed from closed to reopened
  • Resolution fixed deleted
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as reopened
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.