https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88109
Bug ID: 88109 Summary: UBSAN can't work with vector operations Product: gcc Version: 9.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: sanitizer Assignee: unassigned at gcc dot gnu.org Reporter: marxin at gcc dot gnu.org CC: dodji at gcc dot gnu.org, dvyukov at gcc dot gnu.org, jakub at gcc dot gnu.org, kcc at gcc dot gnu.org, marxin at gcc dot gnu.org Target Milestone: --- Following is not detected by UBSAN: $ cat san.c typedef int v2si __attribute__((__vector_size__(8))); int main() { v2si a = {0, 0}; v2si b = {32, 32}; /* Not detected. */ a >>= b; /* Detected. */ // a[0] >> 32; return 0; } $ gcc san.c -fsanitize=undefined && ./a.out [nothing] Note that clang also can't catch that.