Re: [PATCH v2] expand: fix SIGBUS due to unaligned access

Herbert Xu
2026-03-14T09:23:21Z

Natanael Copa <ncopa@alpinelinux.org> wrote:
> Replace direct uint64_t dereference with memcpy() to avoid
> SIGBUS on armv7 when p is not 8-byte aligned.
>
> Fixes crashes in dash during IFS splitting on strict-alignment
> architectures.
>
> Signed-off-by: Natanael Copa <ncopa@alpinelinux.org>
> ---
> src/expand.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> v2:
> - Added a couple more instances of unaligned access.

Patch applied. Thanks.
--
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt