-fsanitize=undefined pointed out a spot that passes NULL to memcpy,
which is undefined behavior according to the C standard.
gdb/ChangeLog
2018-10-03  Tom Tromey  <tom@tromey.com>
	* namespace.c (add_using_directive): Don't pass NULL to memcpy.
+2018-10-03  Tom Tromey  <tom@tromey.com>
+
+       * namespace.c (add_using_directive): Don't pass NULL to memcpy.
+
 2018-10-03  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
 
        * tid-parse.c (tid_is_in_list): Fix wrong 'See' comment.
 
   else
     newobj->declaration = declaration;
 
-  memcpy (newobj->excludes, excludes.data (),
-         excludes.size () * sizeof (*newobj->excludes));
+  if (!excludes.empty ())
+    memcpy (newobj->excludes, excludes.data (),
+           excludes.size () * sizeof (*newobj->excludes));
   newobj->excludes[excludes.size ()] = NULL;
 
   newobj->next = *using_directives;