Subject: Re: [Boost-bugs] [Boost C++ Libraries] #11318: boost unique_lock has no mutex
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-07-05 22:50:00
#11318: boost unique_lock has no mutex
------------------------------+--------------------------------------------
Reporter: shyamps@⦠| Owner: viboes
Type: Bugs | Status: assigned
Milestone: To Be | Component: thread
Determined | Severity: Problem
Version: Boost 1.58.0 | Keywords: boost unique_lock has no mutex
Resolution: |
------------------------------+--------------------------------------------
Changes (by viboes):
* owner: => viboes
* status: new => assigned
* component: None => thread
Old description:
> This is an issue I am observing in the newly released boost_1_58 library.
> I suspect the problem may not be boost related, and could be an msvc 12.0
> compiler related issue. The symptom I observe is that when a Visual C++
> project TURNS ON one of the compiler optimization flags /Og, /O1, /O2 or
> /Ox Flags, the C++ code that I am using below is throwing an exception:
>
> Below is the sample code I use in the application:
>
> boost::mutex::scoped_lock <Scoped Lock Variable> (<Mutex Object>)
>
> Below is the exception message I am seeing which strangely occurs the
> second time a scoped lock is called on the same valid Mutex Object within
> the application:
>
> "boost unique_lock has no mutex"
>
> I am baffled by what causes this problem. When I turn off the
> optimization flags and execute the program, the application executes
> flawlessly. Only when I turn on optimization flags, this error
> consistently occurs. Workaround I am using is to disable optimization
> Flags for the release version.
>
> Below is my build configuration:
>
> Visual Studio community edition 2013, which uses msvc 12 compiler
> version;
> Windows 8.1;
> boost Library version 1.58
New description:
This is an issue I am observing in the newly released boost_1_58 library.
I suspect the problem may not be boost related, and could be an msvc 12.0
compiler related issue. The symptom I observe is that when a Visual C++
project TURNS ON one of the compiler optimization flags /Og, /O1, /O2 or
/Ox Flags, the C++ code that I am using below is throwing an exception:
Below is the sample code I use in the application:
{{{
boost::mutex::scoped_lock <Scoped Lock Variable> (<Mutex Object>)
}}}
Below is the exception message I am seeing which strangely occurs the
second time a scoped lock is called on the same valid Mutex Object within
the application:
"boost unique_lock has no mutex"
I am baffled by what causes this problem. When I turn off the optimization
flags and execute the program, the application executes flawlessly. Only
when I turn on optimization flags, this error consistently occurs.
Workaround I am using is to disable optimization Flags for the release
version.
Below is my build configuration:
Visual Studio community edition 2013, which uses msvc 12 compiler version;
Windows 8.1;
boost Library version 1.58
-- Comment: Please, could you post exactly the code as the following is not valid code {{{ boost::mutex::scoped_lock <Scoped Lock Variable> (<Mutex Object>) }}} -- Ticket URL: <https://svn.boost.org/trac/boost/ticket/11318#comment:1> 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:18 UTC