id,summary,reporter,owner,description,type,status,milestone,component,version,severity,resolution,keywords,cc 2825,class boost::detail::atomic_count assumes long == int,pelee@…,Peter Dimov,"boost::detail::atomic_count (as defined in atomic_count_gcc_x86.hpp, at least), has a member variable value_ that is of type int, yet the class constructor and operators use type long. When building for 64 bit targets on MacOS 10.5 and other LP64 architectures, long is 64 bits, while int is 32, leading to silent truncation if a 64 bit value were used to construct an atomic_count. Changing all of the signatures to use int instead of long solves this problem. It would probably be even safer to replace all the ints with boost::int32_t, assuming that the atomic operations being used really require 32 bit integers. {{{ explicit atomic_count( int v ) : value_( v ) {} void operator++() { __asm__ ( ""lock\n\t"" ""incl %0"": ""+m""( value_ ): // output (%0) : // inputs ""cc"" // clobbers ); } int operator--() { return atomic_exchange_and_add( &value_, -1 ) - 1; } operator int() const { return atomic_exchange_and_add( &value_, 0 ); } }}} ",Bugs,closed,To Be Determined,smart_ptr,Boost Release Branch,Problem,wontfix,,