[Boost-bugs] [Boost C++ Libraries] #11318: boost unique_lock has no mutex

Subject: [Boost-bugs] [Boost C++ Libraries] #11318: boost unique_lock has no mutex
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-05-19 02:46:19


#11318: boost unique_lock has no mutex
-----------------------+--------------------------------------------
 Reporter: shyamps@… | Type: Bugs
   Status: new | Milestone: To Be Determined
Component: None | Version: Boost 1.58.0
 Severity: Problem | Keywords: boost unique_lock has no mutex
-----------------------+--------------------------------------------
 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

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/11318>
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