Subject: Re: [Boost-bugs] [Boost C++ Libraries] #6320: race condition in boost::filesystem::path leads to crash when used in multithreaded programs
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2017-05-09 16:28:48
#6320: race condition in boost::filesystem::path leads to crash when used in
multithreaded programs
-------------------------------+-------------------------
Reporter: aris.basic@⦠| Owner: bemandawes
Type: Bugs | Status: reopened
Milestone: To Be Determined | Component: filesystem
Version: Boost 1.62.0 | Severity: Showstopper
Resolution: | Keywords:
-------------------------------+-------------------------
Comment (by anonymous):
Just noticed that one load could be spared:
{{{
std::locale& path_locale()
{
std::locale* locale = nullptr;
if (!(locale = locale_pointer().load()))
{
std::lock_guard<std::mutex> l(locale_mutex());
if (!(locale = locale_pointer().load()))
{
locale_unique_ptr() =
std::make_unique<std::locale>(default_locale());
locale_pointer().store(locale = locale_unique_ptr().get());
}
}
return *locale;
}
}}}
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/6320#comment:28> 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-05-09 16:32:38 UTC