|
Boost Users : |
Subject: Re: [Boost-users] boost::wave::context deadlocks when called from a DLL
From: Julien Lebot (julien.ar.lebot_at_[hidden])
Date: 2012-06-23 08:27:17
On Wed, Jun 20, 2012 at 9:39 PM, Julien Lebot <julien.ar.lebot_at_[hidden]> wrote:
>
> Here is the (cleaned up) stack trace of the deadlock:
>
> ntdll.dll!0000000076dc135a()
> [Frames below may be incorrect and/or missing, no symbols loaded for ntdll.dll]
> KernelBase.dll!000007fefd4f10dc()
> Nitro.dll!boost::call_once<void (__cdecl*)(void)>(boost::once_flag &
> flag, void (void)* f) Line 197 + 0x18 bytes C++
> Nitro.dll!boost::call_once(void (void)* func, boost::once_flag & flag)
> Line 28 C++
>
> It seems boost::wave is trying to parse some time stamp, and by doing
> so instantiates a grammar and that's when things seem to go bad.
>
> The deadlock happens inside the constructor of the context type, and
> the Visual Studio debugger points me to line 197 in
> boost\thread\win32\once.hpp
>
> BOOST_VERIFY(!::boost::detail::win32::WaitForSingleObject(
> event_handle,::boost::detail::win32::infinite));
>
It seems that call_once is not re-entrant; at least not in Win32, as
indicated by the following ticket:
https://svn.boost.org/trac/boost/ticket/3407
Any ideas on how to work around that issue ?
Best Regards,
Julien Lebot
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net