On Wed, Sep 7, 2016 at 2:03 AM, Paul Eggert wrote:
> With a char[] flexible array member in a struct with nontrivial
> alignment, GCC-generated code can access past the end of the
> array, because GCC assumes there are padding bytes to get the
> struct aligned. So the common idiom of malloc (offs
With a char[] flexible array member in a struct with nontrivial
alignment, GCC-generated code can access past the end of the
array, because GCC assumes there are padding bytes to get the
struct aligned. So the common idiom of malloc (offsetof (struct
s, m), n) does not properly allocate an n-byte