Hi David, Thanks for proposing such a nice module! Uses of malloc/realloc really need a lot of attention and care, and I've also produced bug #7 (memory leak if realloc fails) more than once.
For a module as basic as this one, in gnulib, I think it's essential that the copyright is with the FSF. Can you arrange with Daniel Berrange and/or his employer (Red Hat) that the copyright gets assigned? Otherwise, looks well done. I see only a couple of minor points to be resolved: - avoid collision between xalloc.h and safe-alloc.h over xalloc_oversized, - use xalloc_oversized also before calling calloc, because most libc implementations will not have the overflow check, - use GNU conventions (space between identifier and opening parenthesis, placement of braces) in safe-alloc.h, - perhaps a unit test? Bruno