[Boost-bugs] [Boost C++ Libraries] #5392: Message queue temporary dir named "Select LastBootUpTime from Win32_OperatingSystem" (on win XP)

Subject: [Boost-bugs] [Boost C++ Libraries] #5392: Message queue temporary dir named "Select LastBootUpTime from Win32_OperatingSystem" (on win XP)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-03-30 22:29:58


#5392: Message queue temporary dir named "Select LastBootUpTime from
Win32_OperatingSystem" (on win XP)
--------------------------------------------------------------------+-------
 Reporter: wsx22@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.46.1 | Severity: Problem
 Keywords: interprocess, message queue, temporary directory, temp |
--------------------------------------------------------------------+-------
 There is still problem with message queue temp directory related to bug
 https://svn.boost.org/trac/boost/ticket/4010

 I'm using boost interprocess message queue on Windows XP SP3 32bit, and
 boost 1_46_1

 In first application i'm executing function

 {{{
 mq = new boost::interprocess::message_queue(
                 boost::interprocess::create_only
                 ,mqName->c_str()
                 ,10
                 ,sizeof(MqMessageStruct)
         );
 }}}

 then boost creates temp directory

 C:\Documents and Settings\All Users\Application
 Data\boost_interprocess\20110327091835.364787\

 this is OK.
 In second application I try to create message_queue object by execute
 constructor

 {{{
 boost::interprocess::message_queue mq(
                 boost::interprocess::open_only
                 ,mqName->c_str()
         );
 }}}

 boost creates temp directory named:

 {{{
 C:\Documents and Settings\All Users\Application
 Data\boost_interprocess\Select LastBootUpTime from Win32_OperatingSystem\
 }}}

 and throws exception. Existing message queue can't be open and can't work.
 In boost 1_44 this code was working good (except issue described in ticket
 4010)

 I've watching source code and I think that problem is somewhere in file
 boost_1_46_1\boost\interprocess\detail\win32_api.hpp
 in function
 inline bool get_wmi_class_attribute( std::wstring& strValue, const wchar_t
 *wmi_class, const wchar_t *wmi_class_var)
 between lines 1525 and 1558.
 Maybe pEnumObject Object in line 1547 is empty.

 Another issue is that in file
 \boost_1_46_1\boost\interprocess\detail\tmp_dir_helpers.hpp
 in function
 inline void get_bootstamp(std::string &s, bool add = false)
 (line 38) there is no check for result returned from
 winapi::get_last_bootup_time(bootstamp);
 (line 41)

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