Attention is currently required from: laforge, neels, pespin.
dexter has posted comments on this change. ( https://gerrit.osmocom.org/c/libosmocore/+/35212?usp=email )
Change subject: ecu: force alignment of member data in struct osmo_ecu_state ......................................................................
Patch Set 2:
(2 comments)
Commit Message:
https://gerrit.osmocom.org/c/libosmocore/+/35212/comment/c30385d6_7a242485 PS1, Line 15: thsi
this
Done
Patchset:
PS1:
I'm not sure this is entirely fixing the issue. […]
As far as I understand the line struct {} __attribute__ ((aligned)); will force data[0] into an aligned position, relative to the beginning of the address where struct osmo_ecu_state is stored. This will be an aligned address since the compiler has knowledge about what is stored, but it can not know what we store in the memory beginning from data[0]. However since data[0] is now at an aligned position this is not a problem anymore. To make it look less ugly we can also just define a an uint8_t *data pointer followed by an uint8_t _data[0] array. The pointer member will automatically be in an aligned position and so _data[0] will also be aligned. (see also @laforge@gnumonks.org comments in the referenced ticket.)