[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Architectures where unaligned access is (not) OK?



On Mon, Nov 24, 2014 at 10:38 AM, Riku Voipio <riku.voipio@iki.fi> wrote:
> 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

i am open to suggestion

> Now, the M/T for armel/armhf/arm64 which is ambigous and misleading.
> Better make if clear:
>
>         armel: no

No = sigbus ? or trap ?
>         armhf: yes (exceptions as listed by Leif)
So it is often like i386
>         arm64: yes (exceptions as listed by Leif)
often
>
> And then link to Leif's mail rather than copy the text unattributed on
> already long wikipage.

OK will add link. But I think the page will grow with fpu stuff...

> Riku


Reply to: