Re: Architectures where unaligned access is (not) OK?
On Fri, 21 Nov 2014 12:42:34 +0000, Simon McVittie wrote:
> A couple of questions for people who know low-level things:
>
> * Of Debian's architectures (official and otherwise), which ones are
> known/defined/designed to be OK with unaligned accesses from
> user-space, and which ones (can be configured to) crash or give wrong
> answers?
>
> * Would it be safer to assume that future architectures are in the
> "unaligned accesses are OK" category, or the "not OK"
> category?
>
> The ones I know for sure are:
>
> - OK: any-i386, any-amd64 - not OK: armel
>
> I believe powerpc, s390 and arm64 might be in the "OK" category, and
> mips* and sparc in the "not OK" category.
Sparc is definitely not ok. For evidence, see #721617, liblo was trying
to fetch a double from a 4-byte aligned address. Experience with liblo
shows that other architectures are just fine (or at least are just
slower) with this type of unalignment.
--
Saludos,
Felipe Sateler
Reply to: