https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67535
kargl at gcc dot gnu.org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |kargl at gcc dot gnu.org --- Comment #1 from kargl at gcc dot gnu.org --- (In reply to Vittorio Zecca from comment #0) > During "make check" a null pointer is sometimes passed to memcpy in > write.c:1877 > > memcpy (ext_name, base_name, base_name_len); > > because base_name == NULL > > but base_name_len == 0 so it should be harmless. > To make happy the sanitizer the statement should be > > if(base_name_len) memcpy (ext_name, base_name, base_name_len); What happens to performance? Simply making changes to make sanitizer happy seems rather questionable. It's clear from context that if base_name == NULL, then base_name_len == 0, and the memcpy should be a NOP.