Re: [Boost-bugs] [Boost C++ Libraries] #9912: shared_ptr SEGV in Android debug builds

Subject: Re: [Boost-bugs] [Boost C++ Libraries] #9912: shared_ptr SEGV in Android debug builds
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-04-19 09:01:05

#9912: shared_ptr SEGV in Android debug builds
  Reporter: ian@… | Owner: pdimov
      Type: Bugs | Status: new
 Milestone: To Be Determined | Component: smart_ptr
   Version: Boost 1.55.0 | Severity: Problem
Resolution: | Keywords:

Comment (by pdimov):

> Also, the armeabi binary exhibits the crash on the Nexus 7, while the
 armeabi-v7a does not.

 The problem is that, while the ARMv7 and ARMv6 instruction sets have
 support for memory barriers (the former via a dedicated instruction, DMB,
 the latter by using the coprocessor #15), earlier instruction sets do not.
 (Presumably pre-ARMv6 chips didn't support multiprocessing.)

 Since the Nexus 7 is a multicore device (I suppose), it needs the memory
 barriers to be present in the code for the spinlock to work properly. But,
 since the default configuration doesn't define any ARMv6/ARMv7 macro, we
 have no way of inserting a memory barrier as we have to assume an earlier
 instruction set.

 In principle, one should be able to compile for ARMv6+ while still using
 the earlier ABI, but I don't know how.

 I'm not sure how we can fix that problem on our side. The only option
 seems to be to disable spinlock_gcc_arm.hpp altogether when not on ARMv6+
 and fall back to phtreads.

Ticket URL: <>
Boost C++ Libraries <>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC