https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101758
--- Comment #7 from Andrew Pinski <pinskia at gcc dot gnu.org> --- (In reply to Jakub Jelinek from comment #6) > UBSAN_NULL doesn't check just whether it is non-NULL, but also the alignment. > So no, this doesn't look like the right fix. Ok, I will add the check for align to be non-zero :).