[cfe-dev] Is this an over alignment bug for ARM?

Tim Northover via cfe-dev cfe-dev at lists.llvm.org
Thu Feb 18 14:25:49 PST 2016


Hi Weiming,

On 18 February 2016 at 12:56, Zhao, Weiming via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> I'm debugging an Android code which caused data violation fault and it seems Clang is generating a store with over alignment.

I think that's valid. The "long long" member means that the entire
class must be 8-byte aligned (under AAPCS), in particular the this
pointer itself. And then there are 4 bytes of padding between mBaseLen
and mOffset to ensure mOffset actually is aligned.

Or am I misreading something?

Cheers.

Tim.



More information about the cfe-dev mailing list