960-fix-ubsan-defref.patch 378 B

1234567891011
  1. --- a/gcc/ubsan.c
  2. +++ b/gcc/ubsan.c
  3. @@ -1471,7 +1471,7 @@ ubsan_use_new_style_p (location_t loc)
  4. expanded_location xloc = expand_location (loc);
  5. if (xloc.file == NULL || strncmp (xloc.file, "\1", 2) == 0
  6. - || xloc.file == '\0' || xloc.file[0] == '\xff'
  7. + || xloc.file[0] == '\0' || xloc.file[0] == '\xff'
  8. || xloc.file[1] == '\xff')
  9. return false;