[Boost-bugs] [Boost C++ Libraries] #11523: Interprocess communication between x86 and x64 issue

Subject: [Boost-bugs] [Boost C++ Libraries] #11523: Interprocess communication between x86 and x64 issue
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2015-08-04 13:50:50


#11523: Interprocess communication between x86 and x64 issue
------------------------------------------+--------------------------
 Reporter: lutztonineubert@… | Owner: igaztanaga
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: interprocess
  Version: Boost 1.58.0 | Severity: Problem
 Keywords: ipc, platform, lock, windows |
------------------------------------------+--------------------------
 My code below is a very simple example, that should work to communicate
 between x86 and x64. But it doesn't...

 If I create it in x64 and open in win32, the win32 process stuck at a lock
 at
 function ''try_based_lock'' in
 `boost/int/sync/detail/common_algorithms.hpp`

 In the other way around: win32 create, x64 open: the x64 process crashes
 at
 ''name_length'' in `segment_manager_helper.hpp` while trying to find the
 name from an index (''priv_generic_find'' in `segment_manager.hxx`).

 {{{#!c++
 #include <iostream>
 #include <boost/interprocess/managed_shared_memory.hpp>

 int main() {
     namespace bip = boost::interprocess;
     // open in WIN32, create in x64
 #ifdef _WIN32
     bip::managed_shared_memory msm(bip::open_only, "TestIPC");
 #elsif X64
     bip::shared_memory_object::remove("TestIPC");
     bip::managed_shared_memory msm(bip::create_only, "TestIPC", 4096);
     msm.construct<uint32_t>("Data")[1](10);
 #endif
     // Get Data and print it
     auto data = msm.find<uint32_t>("Data");
     if (data.second == 1) {
         std::cout << *data.first << std::endl;
     }
     std::cin.ignore();
     return 0;
 }
 }}}

 I am using Windows 7 and VC12.

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