[Boost-bugs] [Boost C++ Libraries] #5166: interprocess::message_queue does not work between 64 bits and 32 bits processes

Subject: [Boost-bugs] [Boost C++ Libraries] #5166: interprocess::message_queue does not work between 64 bits and 32 bits processes
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2011-02-07 15:31:41


#5166: interprocess::message_queue does not work between 64 bits and 32 bits
processes
-------------------------------------------+--------------------------------
 Reporter: dmashkov@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.45.0 | Severity: Showstopper
 Keywords: message_queue 64 bits 32 bits |
-------------------------------------------+--------------------------------
 The boost::interprocess::message_queue class does not work between 64 and
 32 bits processes on Windows (I am using Wndows 2008r2 x64).

 I found that problem in mq_hdr_t class. Members of this class has
 std::size_t type. But size of std::size_t is different in 64 and 32 bit
 versions. At current moment first code string of method
 message_queue::do_receive(...) do this:


 detail::mq_hdr_t *p_hdr =
 static_cast<detail::mq_hdr_t*>(m_shmem.get_user_address());


 That is realization assigned a binary chunk from a shared memory to the
 pointer, not taking into account the fact that a 32 bit process size_t was
 2 times smaller than 64 bit process. As a result, the data are shifted and
 the assigned are incorrectly.

 I do not know this bug or some sort of "feature"... - I could not find any
 restrictions on use of message_queue class in documentation.

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