Subject: Re: [boost] Help with a shared_ptr problem on Android (ARM)
From: Peter Dimov (lists_at_[hidden])
Date: 2014-04-17 10:11:34
Andrey Semashev wrote:
> On Thu, Apr 17, 2014 at 4:53 PM, Peter Dimov <lists_at_[hidden]> wrote:
> > https://svn.boost.org/trac/boost/ticket/9912
> > reports that spinlock_gcc_arm.hpp segfaults on a Nexus 7.
> > Unfortunately, I know next to nothing about ARM or Android, so I wonder
> > if someone can help with that.
> I'm probably even less experienced with ARM than you are, but there is an
> interesting comment in boost/atomic/detail/gcc-armv6plus.hpp that explains
> some things about different ARM ISA versions.
> From Wikipedia it seems that Nexus 7 has an ARMv7 CPU, but the compiler is
> probably reducing the target CPU to ARMv6 or even lower (judging by the
> fact that __thumb__ is not defined). In this version mcr instruction is
> used for a memory barrier. As I understand it, it's basically an
> instruction for a co-processor (15 in this case). I suspect that that
> particular SoC could have this co-processor number reserved. Of course,
> all this is just a speculation on my part, so take it with a grain of
> salt. It would be useful to see the backtrace and disassembly to verify my
I suspect that the target CPU is not even set to ARMv6, in which case no
memory barrier instructions are inserted.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk