Ticket #4895 (closed Bugs: fixed)
Wrong temporary path determined by boost::interprocess::managed_shared_memory
|Reported by:||simon.gysi@…||Owned by:||igaztanaga|
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?
- Severity changed from Problem to Showstopper
- Milestone changed from To Be Determined to Boost 1.46.0
- Status changed from new to closed
- Resolution set to fixed