Attention is currently required from: laforge, neels, pespin.
Hello Jenkins Builder, laforge, neels, pespin,
I'd like you to reexamine a change. Please visit
https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email
to look at the new patch set (#6).
The following approvals got outdated and were removed: Verified+1 by Jenkins Builder
Change subject: ecu: force alignment of member data in struct osmo_ecu_state ......................................................................
ecu: force alignment of member data in struct osmo_ecu_state
The member data[0] in struct osmo_ecu_state is used as an anchor to attach private structs for a concrete ECU implementation. This works by allocating more memory then struct osmo_ecu_state actually needs and then using the excess memory to store the private struct of the concrete ECU implementation.
However, this poses a problem since data[0] is at the end of the struct it may land in an unaligned position. This also means that the struct we store there is also unaligned. We should fix this enclosing the public struct osmo_ecu_state into our private struct fr_ecu_state. Then we can simply cast from osmo_ecu_state to fr_ecu_state and correct alignment is ensured as well.
Related: OS#6286 Change-Id: I28672856e8e8f47e04ffe09ee3e07b577108cdc7 --- M src/codec/ecu_fr.c 1 file changed, 36 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/12/35212/6