Attention is currently required from: laforge, neels, pespin.
dexter uploaded patch set #4 to this change.
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, 30 insertions(+), 13 deletions(-)
git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/12/35212/4
To view, visit change 35212. To unsubscribe, or for help writing mail filters, visit settings.