Opened 12 years ago

Closed 6 years ago

#5166 closed Bugs (wontfix)

interprocess::message_queue does not work between 64 bits and 32 bits processes

Reported by: dmashkov@… Owned by: Ion Gaztañaga
Milestone: To Be Determined Component: interprocess
Version: Boost 1.45.0 Severity: Showstopper
Keywords: message_queue 64 bits 32 bits Cc:

Description

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.

Change History (2)

comment:1 by Ion Gaztañaga, 12 years ago

It's definitely a bug, thanks for the report.

comment:2 by Ion Gaztañaga, 6 years ago

Resolution: wontfix
Status: newclosed

Revisiting old bugs I've found this was not implemented to avoid breaking ABI of existing applications. Marked as wontfix.

Note: See TracTickets for help on using tickets.