Boost C++ Libraries: Ticket #11523: Interprocess communication between x86 and x64 issue https://svn.boost.org/trac10/ticket/11523 <p> My code below is a very simple example, that should work to communicate between x86 and x64. But it doesn't... </p> <p> If I create it in x64 and open in win32, the win32 process stuck at a lock at function <em>try_based_lock</em> in <code>boost/int/sync/detail/common_algorithms.hpp</code> In the other way around: win32 create, x64 open: the x64 process crashes at <em>name_length</em> in <code>segment_manager_helper.hpp</code> while trying to find the name from an index (<em>priv_generic_find</em> in <code>segment_manager.hxx</code>). </p> <div class="wiki-code"><div class="code"><pre><span class="cp">#include</span> <span class="cpf">&lt;iostream&gt; </span><span class="cp"></span> <span class="cp">#include</span> <span class="cpf">&lt;boost/interprocess/managed_shared_memory.hpp&gt; </span><span class="cp"></span> <span class="kt">int</span> <span class="nf">main</span><span class="p">()</span> <span class="p">{</span> <span class="k">namespace</span> <span class="n">bip</span> <span class="o">=</span> <span class="n">boost</span><span class="o">::</span><span class="n">interprocess</span><span class="p">;</span> <span class="c1">// open in WIN32, create in x64 </span> <span class="cp">#ifdef _WIN32 </span> <span class="n">bip</span><span class="o">::</span><span class="n">managed_shared_memory</span> <span class="n">msm</span><span class="p">(</span><span class="n">bip</span><span class="o">::</span><span class="n">open_only</span><span class="p">,</span> <span class="s">&quot;TestIPC&quot;</span><span class="p">);</span> <span class="cp">#elsif X64 </span> <span class="n">bip</span><span class="o">::</span><span class="n">shared_memory_object</span><span class="o">::</span><span class="n">remove</span><span class="p">(</span><span class="s">&quot;TestIPC&quot;</span><span class="p">);</span> <span class="n">bip</span><span class="o">::</span><span class="n">managed_shared_memory</span> <span class="n">msm</span><span class="p">(</span><span class="n">bip</span><span class="o">::</span><span class="n">create_only</span><span class="p">,</span> <span class="s">&quot;TestIPC&quot;</span><span class="p">,</span> <span class="mi">4096</span><span class="p">);</span> <span class="n">msm</span><span class="p">.</span><span class="n">construct</span><span class="o">&lt;</span><span class="kt">uint32_t</span><span class="o">&gt;</span><span class="p">(</span><span class="s">&quot;Data&quot;</span><span class="p">)[</span><span class="mi">1</span><span class="p">](</span><span class="mi">10</span><span class="p">);</span> <span class="cp">#endif </span> <span class="c1">// Get Data and print it </span> <span class="k">auto</span> <span class="n">data</span> <span class="o">=</span> <span class="n">msm</span><span class="p">.</span><span class="n">find</span><span class="o">&lt;</span><span class="kt">uint32_t</span><span class="o">&gt;</span><span class="p">(</span><span class="s">&quot;Data&quot;</span><span class="p">);</span> <span class="k">if</span> <span class="p">(</span><span class="n">data</span><span class="p">.</span><span class="n">second</span> <span class="o">==</span> <span class="mi">1</span><span class="p">)</span> <span class="p">{</span> <span class="n">std</span><span class="o">::</span><span class="n">cout</span> <span class="o">&lt;&lt;</span> <span class="o">*</span><span class="n">data</span><span class="p">.</span><span class="n">first</span> <span class="o">&lt;&lt;</span> <span class="n">std</span><span class="o">::</span><span class="n">endl</span><span class="p">;</span> <span class="p">}</span> <span class="n">std</span><span class="o">::</span><span class="n">cin</span><span class="p">.</span><span class="n">ignore</span><span class="p">();</span> <span class="k">return</span> <span class="mi">0</span><span class="p">;</span> <span class="p">}</span> </pre></div></div><p> I am using Windows 7 and VC12. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/11523 Trac 1.4.3