Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
ARCH_INT64_ALIGN incorrectly detected on linux / arm / gcc 4.4.3 #5088
Original bug ID: 5088
The default behaviour of linux on ARM processors is to ignore alignment faults occurring in user processes (rather than sending a SIGBUS, as is normal on other alignment-sensitive architectures). The instruction causing the fault, however, has undefined results.
Ocaml's configuration script attempts to detect alignment-sensitivity by trying to provoke a SIGBUS in config/auto-aux/int64align.c. On ARM systems running linux, the alignment fault is ignored, leading the configuration script to incorrectly unset ARCH_ALIGN_INT64 in config/m.h.
Steps to reproduce:
$ echo 0 > /proc/cpu/alignment # this is the default - ignore alignment faults
$ echo 4 > /proc/cpu/alignment # alignment faults cause SIGBUS
Since ignoring alignment faults is default behaviour for linux on ARM, I suggest that the configure script set ARCH_ALIGN_INT64 for all arm*-linux hosts (as is already done for sparc).
The problem doesn't seem to occur with gcc 4.3. Possibly earlier gccs don't provide native 64 bit ints on ARM???