Re: Architectures where unaligned access is (not) OK?
On Sat, Nov 22, 2014 at 11:03:16PM +0100, Bastien ROUCARIES wrote:
> On Sat, Nov 22, 2014 at 10:37 PM, brian m. carlson
> <sandals@crustytoothpaste.net> wrote:
> > On Sat, Nov 22, 2014 at 09:42:43PM +0100, Jakub Wilk wrote:
> >> * Henrique de Moraes Holschuh <hmh@debian.org>, 2014-11-21, 17:34:
> >> >i386:
> >> > __asm__("pushf\norl $0x40000,(%esp)\npopf");
> >>
> >> It works! Actually, it works so well it makes puts("hello world") die with
> >> SIGBUS. :-(
> >
> > Yeah, that's my experience, too. glibc is not alignment check-safe on
> > i386 and amd64. If you turn it on in an LD_PRELOAD using _init, it
> > segfaults before main.
> I have improved https://wiki.debian.org/ArchitectureSpecificsMemo fell
> free to add to it.
Thanks for updates. However, I'm not sure if the current unaligned
accesses letters make it clear:
Y=Yes, O=Often generally ok but ma fail in some specific case, T=Traps
may be fixed by kernel (super slow),M=Maybe generally not ok, N=No raise
SIGBUS. See detail below
Now, the M/T for armel/armhf/arm64 which is ambigous and misleading.
Better make if clear:
armel: no
armhf: yes (exceptions as listed by Leif)
arm64: yes (exceptions as listed by Leif)
And then link to Leif's mail rather than copy the text unattributed on
already long wikipage.
Riku
Reply to: