ipc3: check alignment of ext data#9459
Conversation
Sizes are not currently checked for alignment, this can generated unaligned pointers for aligned types which is undefined behaviour. Signed-off-by: Curtis Malainey <cujomalainey@chromium.org>
|
I was really wondering how the GCC I think the answer is: this is now part of the standard! But under a different name: So the GCC extension has likely been "retrofitted" to behave like the standard |
lgirdwood
left a comment
There was a problem hiding this comment.
This will fix for v2.11, I think we made a mistake using bytes for size in IPC3 when we always use words for size/alignment. Oh well.
|
Whoops, there is an |
Maybe an opportunity to add some "TODOs: switch to the new standard" next to these macro definitions? |
Sizes are not currently checked for alignment, this can generated unaligned pointers for aligned types which is undefined behaviour.