https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100124
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Behdad Esfahbod from comment #6) > > But I will note GCC treats (all) arrays at the end of a POD struct as a > > flexible one so the question I have is more about the ubsan issue you are > > running into, is that with GCC or with clang/LLVM? > > The ubsan issue reported to us is with gcc: > https://github.com/harfbuzz/harfbuzz/issues/2953#issuecomment-823460893 Can you report that as a bug as GCC's rule is treat all arrays that end a POD as a flexiable array? Please include the full preprocessed source that produces the problem at runtime and the specific version of GCC that is used. This is a GCC bug in mind due to this unless there is another field missing that is in the source that you are not showing.