Boost C++ Libraries: Ticket #529: BOOST_SP_USE_QUICK_ALLOCATOR and BOOST_AUTO_UNIT_TEST https://svn.boost.org/trac10/ticket/529 <pre class="wiki">When using BOOST+AUTO_UNIT_TEST and BOOST_SP_USE_QUICK_ALLOCATOR and BOOST_HAS_THREADS macros under Windows (MSVC71) Access Violation occurs in "lightweight_mutex::scoped_lock::scoped_lock". This behavior produced by error in "boost::detail::allocator_impl" or in Test Framework. Mutex for locking created by static member. Automatic unittests created by using global variables. So we have using uninitialized CRITICAL_SECTION because order of global variables initialization is undefined. I tried to convert "boost::detail::allocator_impl::mutex" from static variable to Meyer's singleton (with static member function which contains local static variable "mutex"). This solves my problem but I can't suggest any patch because I can't test it with many compilers. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/529 Trac 1.4.3 Peter Dimov Tue, 06 Dec 2005 12:25:55 GMT status changed https://svn.boost.org/trac10/ticket/529#comment:1 https://svn.boost.org/trac10/ticket/529#comment:1 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=305912 Fixed in CVS. </pre> Ticket nobody Wed, 07 Dec 2005 09:42:24 GMT <link>https://svn.boost.org/trac10/ticket/529#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/529#comment:2</guid> <description> <pre class="wiki">Logged In: NO I see to changes and have following question: what you think about potential "allocator_impl::mutex()" method inlining? If it will be inlined (because defined in body of struct) we will have thread synchrnization errors. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>Peter Dimov</dc:creator> <pubDate>Wed, 07 Dec 2005 11:48:58 GMT</pubDate> <title/> <link>https://svn.boost.org/trac10/ticket/529#comment:3 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/529#comment:3</guid> <description> <pre class="wiki">Logged In: YES user_id=305912 Inlining doesn't affect behavior (unless the compiler is buggy); all inlined copies (should) share a single static variable and initialization flag. We could move the definition outside the class, but some compilers will inline it anyway, because the definition will still be visible to them. </pre> </description> <category>Ticket</category> </item> </channel> </rss>