]> git.feebdaed.xyz Git - 0xmirror/binutils-gdb.git/commit
PR 33721 load/store of misaligned address
authorAlan Modra <amodra@gmail.com>
Tue, 16 Dec 2025 21:30:24 +0000 (08:00 +1030)
committerAlan Modra <amodra@gmail.com>
Tue, 16 Dec 2025 21:30:24 +0000 (08:00 +1030)
commit44e7622937280a0a7c679949fc313d6ffc710701
treee15546a70255fce578c2f7bdaf755b53989ad49d
parent7906277c9a15446d16ae5e0e2e859a01b95fe342
PR 33721 load/store of misaligned address

This fixes PR33721 by a common technique of declaring a packed struct
to access unaligned integer fields.  (See eg. linux kernel
include/vdso/unaligned.h)  I've tidied the PR29856 fix for a similar
bug too (not that there was anything wrong with that fix).

PR 33721
PR 29856
* sframe.c (flip_fre_start_address): Use a packed struct to
access 2-byte and 4-byte unaligned fields.  Make addr a void*.
(sframe_decode_fre_start_address): Similarly, and remove
unnecessary casts.  Always set *fre_start_addr.
libsframe/sframe.c