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
tests.

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.

https://llvm.org/bugs/show_bug.cgi?id=22728

http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-February/041493.html

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.

Reid,

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?

cheers,
--renato

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.
-Ahmed

Hi Ahmed,

Thanks! That sounds great!

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

cheers,
--renato

-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:

http://lab.llvm.org:8011/builders/clang-native-arm-cortex-a9/builds/29351

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?

cheers,
--renato