Subject: [Boost-bugs] [Boost C++ Libraries] #4895: Wrong temporary path determined by boost::interprocess::managed_shared_memory
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2010-11-25 09:56:32
#4895: Wrong temporary path determined by
boost::interprocess::managed_shared_memory
-----------------------------------+----------------------------------------
Reporter: simon.gysi@⦠| Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
Version: Boost 1.45.0 | Severity: Problem
Keywords: |
-----------------------------------+----------------------------------------
Creating a boost::interprocess::managed_shared_memory object (create_only)
may determine a wrong temporary path for the shared memory file, if the
COM environment has already been initialized for the current thread.
The function inline bool ''get_wmi_class_attribute( std::wstring&
strValue, const wchar_t *wmi_class, const wchar_t *wmi_class_var)'' in the
file ''\boost\interprocess\detail\win32_api.hpp'' doesn't always work
correct. It gets called to fetch the last bootup time from WMI. The last
bootup is then used to build the temporary path.
The call to CoInitializeSecurity(..) may fail due to various reasons,
which are not always a failure. Eg. the CoInitializeSecurity(..) has
already been called with different settings (-> HRESULT is 0x80010119).
Remarks for the function mention above:
- The CoInitialize(..) / CoUninitialize(..) call have to be balanced (with
RAII).
- Also the CoCreateInstance(..) / Release(..) calls have to be balanced.
>> Both are constraints are broken due to the several early returns.
- Also the call to CoInitialize may fail - how to deal with that?
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/4895> 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:04 UTC