[Boost-bugs] [Boost C++ Libraries] #9262: windows_intermodule_singleton breaks when calling a Debug dll from a Release executable

Subject: [Boost-bugs] [Boost C++ Libraries] #9262: windows_intermodule_singleton breaks when calling a Debug dll from a Release executable
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-18 10:28:48


#9262: windows_intermodule_singleton breaks when calling a Debug dll from a
Release executable
------------------------------------+--------------------------
 Reporter: Lars Hagström <lars@…> | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
------------------------------------+--------------------------
 A simplified example of what goes wrong (the reality is more complex, and
 also very difficult for me to change):

 On Windows I have an exe and a dll that both use boost.interprocess. The
 dll interface is C-like, so that the exe and dll can use different
 runtimes (i.e. Debug and Release runtimes).
 This works fine as long as I comment out the
 BOOST_INTERPROCESS_HAS_KERNEL_BOOTTIME define in workaround.hpp. But if I
 leave that define in the code I will get random access violations deep
 inside the tmp_folder function (or one of the other functions in
 tmp_dir_helpers).

 I believe that this is due to the windows_intermodule_singleton, which is
 only used when ...HAS_KERNEL_BOOTTIME is defined. This singleton will get
 created in one runtime and then accessed in another, which does not work
 since it contains a std::map, which is an STL object that is not possible
 to pass between runtimes in Visual C++.

 If it is possible to fix this that would be great, but the other option
 would be a "nicer" way to turn off the singleton without having to patch
 one of the boost headers.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9262>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC