https://gcc.gnu.org/bugzilla/show_bug.cgi?id=86839
--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> --- Try using -fsanitizer=undefined . As I think you are violating c/c++ alignment rules. That is a pointer to a float has an alignment requirement of 4 bytes but your pointer that you are using only has an alignment of 1 byte.