Boost C++ Libraries: Ticket #9262: windows_intermodule_singleton breaks when calling a Debug dll from a Release executable https://svn.boost.org/trac10/ticket/9262 <p> A simplified example of what goes wrong (the reality is more complex, and also very difficult for me to change): </p> <p> 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). </p> <p> 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++. </p> <p> 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. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/9262 Trac 1.4.3 Ion Gaztañaga Thu, 14 Aug 2014 11:51:19 GMT <link>https://svn.boost.org/trac10/ticket/9262#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9262#comment:1</guid> <description> <p> Boost 1.56 replaces std::map with boost::container::map so maybe now you can mix runtimes. </p> </description> <category>Ticket</category> </item> <item> <author>lars@…</author> <pubDate>Wed, 17 Sep 2014 13:04:33 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/9262#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9262#comment:2</guid> <description> <p> Yes, this seems to work now! Thanks! </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Ion Gaztañaga</dc:creator> <pubDate>Wed, 17 Sep 2014 16:36:19 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/9262#comment:3 https://svn.boost.org/trac10/ticket/9262#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">fixed</span> </li> </ul> <p> Thanks for the report, closing the issue. </p> Ticket emil.styrke@… Wed, 25 Feb 2015 15:23:31 GMT <link>https://svn.boost.org/trac10/ticket/9262#comment:4 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/9262#comment:4</guid> <description> <p> Replying to <a class="ticket" href="https://svn.boost.org/trac10/ticket/9262#comment:1" title="Comment 1">igaztanaga</a>: </p> <blockquote class="citation"> <p> Boost 1.56 replaces std::map with boost::container::map so maybe now you can mix runtimes. </p> </blockquote> <p> What if I have an application with two modules that use different versions of Boost (For example one uses 1.55 and one uses 1.56)? I tried reading the code but I can't really tell if there is any versioning mechanism in place. </p> <p> The practical case: we use Boost in a shared library that we sell to customers. A customer might use other third-party libraries that in turn use Boost of a different version. </p> </description> <category>Ticket</category> </item> <item> <author>sakhnik@…</author> <pubDate>Wed, 16 Aug 2017 10:05:19 GMT</pubDate> <title>status changed; resolution deleted https://svn.boost.org/trac10/ticket/9262#comment:5 https://svn.boost.org/trac10/ticket/9262#comment:5 <ul> <li><strong>status</strong> <span class="trac-field-old">closed</span> → <span class="trac-field-new">reopened</span> </li> <li><strong>resolution</strong> <span class="trac-field-deleted">fixed</span> </li> </ul> <p> I believe the last comment raises a valid concern. If I have an extensive dll-based plugin system, where different ones are linking with different versions of boost, it gets impossible to debug when using boost::interprocess. </p> Ticket