Unstable ARM buldbots == Unaligned Clang?

Hi Galina,

I was wondering what's so unstable about the panda bots. In the past,
I used to have them crashing down instead of failing to run a test,
and your bots are pretty consistent at failing the same set of Clang

It's possible that this has nothing to do with the pandaboard, but to
do with the other Clang problem that we are aware for a while now:
Clang objects not always align well in memory, and occasionally break
at run time on ARM.



If this is the case, I think we need a bigger effort to fix this, as
it seems wide-spread enough that my poor Clang skills won't cut. Also,
this problem affects self-hosting on ARM every other month and
disappear out of the blue. We really need to nail it once and for all.


On the list you said instead of trying to get it right, we should just
set alignment of 1 to all such objects. That won't work with some ARM
instructions that force alignment if the structure happens to be
somewhere in between. I believe this is what's causing it to crash on
ARM and not on other self-hosting platforms.

Do you have any other suggestion? Why is this code so complicated? Why
not let the compiler calculate the size/alignment?


I think James (cc'd) has been taking care of those issues (see
http://reviews.llvm.org/D10272, http://reviews.llvm.org/D10271, both
not committed yet), hopefully that'll help.

Hi Ahmed,

Thanks! That sounds great!

I'll keep an eye on those patches, and make sure that the Pandas are
happy after them.


-fsanitize=undefined should catch and diagnose these sorts of alignment issues IIRC.

– Sean Silva

Hi Ahmed, James,

I believe both patches are now in, and the behaviour on the Panda
board is a lot better. But we still have some flukes, for example:


That looks more or less like the same problems we were having before.
Is there anything more to do in this area, or were you guys done?