Mantis Bug Tracker

View Issue Details Jump to Notes ] Issue History ] Print ]
IDProjectCategoryView StatusDate SubmittedLast Update
0005088OCaml~DO NOT USE (was: OCaml general)public2010-06-25 00:562012-03-24 15:01
Assigned Toxleroy 
PlatformOSOS Version
Product Version3.12.0+beta1 or 3.12.0+rc1 
Target VersionFixed in Version3.12.0+beta1 or 3.12.0+rc1 
Summary0005088: ARCH_INT64_ALIGN incorrectly detected on linux / arm / gcc 4.4.3
DescriptionThe 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
$ 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???
TagsNo tags attached.
Attached Files

- Relationships

-  Notes
xleroy (administrator)
2010-07-06 13:33

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*-*-*).

- Issue History
Date Modified Username Field Change
2010-06-25 00:56 jp30 New Issue
2010-07-06 13:33 xleroy Note Added: 0005580
2010-07-06 13:33 xleroy Assigned To => xleroy
2010-07-06 13:33 xleroy Status new => resolved
2010-07-06 13:33 xleroy Resolution open => fixed
2010-07-06 13:33 xleroy Fixed in Version => 3.12.0+beta1
2012-03-24 15:01 xleroy Status resolved => closed
2017-02-23 16:36 doligez Category OCaml general => -OCaml general
2017-03-03 17:55 doligez Category -OCaml general => -(deprecated) general
2017-03-03 18:01 doligez Category -(deprecated) general => ~deprecated (was: OCaml general)
2017-03-06 17:04 doligez Category ~deprecated (was: OCaml general) => ~DO NOT USE (was: OCaml general)

Copyright © 2000 - 2011 MantisBT Group
Powered by Mantis Bugtracker