Subject: [Boost-bugs] [Boost C++ Libraries] #5120: boost.interprocess.detail tmp_dir_helpers.hpp get_bootstamp(std::string, bool) function problem
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-01-25 14:37:34
#5120: boost.interprocess.detail tmp_dir_helpers.hpp get_bootstamp(std::string,
bool) function problem
----------------------------------------------------+-----------------------
Reporter: Darko Nesovic <nesovicdarko@â¦> | Owner: igaztanaga
Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
Version: Boost 1.45.0 | Severity: Problem
Keywords: |
----------------------------------------------------+-----------------------
Because of bug #4230, I switched to boost 1.45.0 from 1.42.0, but,
application unexpectedly crashes on Windows platform. After short
investigation in source code, I noticed that problem lies in
get_bootstamp(std::string&, bool) function, which has changed in latest
release, more precisely, folder name construction has changed. In some
cases, function winapi::get_last_bootup_time(std::string&) which calls
get_wmi_class_attribute, returns empty string instead of last bootup time.
In that case, code inside if statement:
if( 0 == CoInitializeSecurity( 0, -1, 0, 0, RPC_C_AUTHN_LEVEL_PKT_IG,
RPC_C_IMP_LEVEL_IMPERSONATE_IG, 0, EOAC_NONE_IG, 0 ) )
{
IWbemLocator_IG * pIWbemLocator = 0;
....
}
has not been reached, actually, CoInitializeSecurity returns:
RPC_E_TOO_LATE CoInitializeSecurity has already been called.
In this case, shared memory is created in:
C:\ProgramData\boost_interprocess\foo.shm instead of
C:\ProgramData\boost_interprocess\last_boot_time\foo.shm.
This causes that next time when application tries to open created shared
memory, it has been deleted, and interprocess exception file not found has
been thrown.
I don't know is this behavior a real bug, or I'm doing something wrong,
but application has worked perfectly with 1.42.0 version, but due to bug
#4320 I had to switch on 1.45.0.
Also, I'm interesting about reasons for shared memory folder name
construction has been changed, because, I tried 1.45.0 with an old way (I
edit get_bootstamp), and it worked!
-- Ticket URL: <https://svn.boost.org/trac/boost/ticket/5120> 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:05 UTC