this_thread::get_id() never returns occasionally

Hi, I'm running boost on an iPhone 3G compiled with the official 3.2 SDK on a regular iPhone (i.e. not jailbroken). Sometimes I get a strange situation where calling this_thread::get_id() never returns. #0 scoped_lock [inlined] () at spinlock_gcc_arm.hpp:45 #1 boost::detail::spinlock::lock () at boost_1_44_0/boost/smart_ptr/detail/spinlock_pool.hpp:41 #2 boost::detail::sp_counted_base::weak_add_ref () at spinlock_gcc_arm.hpp:61 #3 atomic_increment [inlined] () at boost_1_44_0/boost/smart_ptr/detail/sp_counted_base_spin.hpp:364 #4 0x000b6c38 in boost::(anonymous namespace)::make_external_thread_data () at spinlock_gcc_arm.hpp:189 #5 0x000b849c in boost::this_thread::get_id () at libs/thread/src/pthread/thread.cpp:189 Is this a bug? Kind regards, Samuel

Samuel Williams wrote:
Hi,
I'm running boost on an iPhone 3G compiled with the official 3.2 SDK on a regular iPhone (i.e. not jailbroken).
Sometimes I get a strange situation where calling this_thread::get_id() never returns.
#0 scoped_lock [inlined] () at spinlock_gcc_arm.hpp:45 #1 boost::detail::spinlock::lock () at boost_1_44_0/boost/smart_ptr/detail/spinlock_pool.hpp:41 #2 boost::detail::sp_counted_base::weak_add_ref () at spinlock_gcc_arm.hpp:61 #3 atomic_increment [inlined] () at boost_1_44_0/boost/smart_ptr/detail/sp_counted_base_spin.hpp:364
This can happen if some of your files that use shared_ptr are compiled for Thumb and some are not (the implementation is different because ARM in Thumb mode has no swp instruction).
participants (2)
-
Peter Dimov
-
Samuel Williams