emacs-devel
[Top][All Lists]
Advanced

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

Re: HAVE_FAST_UNALIGNED_ACCESS


From: Mattias Engdegård
Subject: Re: HAVE_FAST_UNALIGNED_ACCESS
Date: Thu, 30 Mar 2023 12:28:30 +0200

30 mars 2023 kl. 11.34 skrev Robert Pluim <rpluim@gmail.com>:

> but even if unaligned access is normally permitted by a machine, it is
> still undefined behavior to dereference an unaligned pointer.

That's not necessarily a problem; we have plenty of formally undefined 
behaviour. What's important is whether we can be confident that it works.

> Instead, HAVE_FAST_UNALIGNED_ACCESS and UNALIGNED_LOAD_SIZE should be
> removed and memcpy used instead:

No, this isn't something we should be doing at all unless the platform allows 
fast unaligned access.

Ideally we shouldn't do any of this nonsense but I haven't worked out how to 
get the autovectorisers to kick in.

> Emacs currently
> crashes when built with various compilers performing pointer alignment
> checks.

Which compilers, exactly?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]