You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Original bug ID: 5088 Reporter: jp30 Assigned to:@xavierleroy Status: closed (set by @xavierleroy on 2012-03-24T14:01:46Z) Resolution: fixed Priority: normal Severity: major Version: 3.12.0+beta1 or 3.12.0+rc1 Fixed in version: 3.12.0+beta1 or 3.12.0+rc1 Category: ~DO NOT USE (was: OCaml general)
Bug description
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
$ ./configure && make world # will SIGSEGV
$ grep ALIGN_INT64 config/m.h
#undef ARCH_ALIGN_INT64
$ echo 4 > /proc/cpu/alignment # alignment faults now cause SIGBUS
$ make clean && make world # will SIGBUS
$ echo 4 > /proc/cpu/alignment # alignment faults cause SIGBUS
$ ./configure && make world # build completes correctly
$ grep ALIGN_INT64 config/m.h
#define ARCH_ALIGN_INT64
Suggested remedy:
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???
The text was updated successfully, but these errors were encountered:
I'm at a loss to guess which ARM instructions generated by gcc could cause problem with 4-aligned 64-bit accesses. Nonetheless, I updated the configure script as suggested (force alignment for arm*--).
Original bug ID: 5088
Reporter: jp30
Assigned to: @xavierleroy
Status: closed (set by @xavierleroy on 2012-03-24T14:01:46Z)
Resolution: fixed
Priority: normal
Severity: major
Version: 3.12.0+beta1 or 3.12.0+rc1
Fixed in version: 3.12.0+beta1 or 3.12.0+rc1
Category: ~DO NOT USE (was: OCaml general)
Bug description
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
$ ./configure && make world # will SIGSEGV
$ grep ALIGN_INT64 config/m.h
#undef ARCH_ALIGN_INT64
$ echo 4 > /proc/cpu/alignment # alignment faults now cause SIGBUS
$ make clean && make world # will SIGBUS
$ echo 4 > /proc/cpu/alignment # alignment faults cause SIGBUS
$ ./configure && make world # build completes correctly
$ grep ALIGN_INT64 config/m.h
#define ARCH_ALIGN_INT64
Suggested remedy:
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???
The text was updated successfully, but these errors were encountered: