[Boost-bugs] [Boost C++ Libraries] #9207: different sizeof atomic_count (boost/asio/detail/atomic_count.hpp) type after comilation with --std=c++11 than after comilation without --std=c++11 (gcc, x86_64).

Subject: [Boost-bugs] [Boost C++ Libraries] #9207: different sizeof atomic_count (boost/asio/detail/atomic_count.hpp) type after comilation with --std=c++11 than after comilation without --std=c++11 (gcc, x86_64).
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-10-07 11:31:25


#9207: different sizeof atomic_count (boost/asio/detail/atomic_count.hpp) type
after comilation with --std=c++11 than after comilation without --std=c++11
(gcc, x86_64).
---------------------------------------------+----------------------------
 Reporter: Karol Nowacki <karol.nowacki@…> | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
---------------------------------------------+----------------------------
 atomic_count has different size when compiling with --std==c++11
 (sizeof(long)) than compiling without --std=c++11 (sizof(int)). Hence
 classes which use atomic_count have different memory layout of members
 depending on --std compilation option. This leads to troubles when
 program is built from object files compiled with --std=c++11 and files
 compiled without --std=c++11.

 This phenomena is not visible for clang (clang std lib contains
 std::atomic)
 Problem is also not visible on i386 (sizeof(long) == sizeof(int))

 Problem exists in 1.54 and on the trunk.

 In attached example task_io_service has different size in two compilation
 units. This leads to segmentation fault.

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