[PATCH] Check for null pointers given to memcpy with ubsan

Nuno Lopes nunoplopes at sapo.pt
Mon May 11 14:42:02 PDT 2015


> Wait a second, won't UBSan handle this automatically if memcpy/memmove are 
> declared with __attribute__((nonnull)) in the header? Otherwise, is there 
> a change to the standard that imposes these additional constraints on 
> memcpy/memmove?

Not really. memcpy/memmove calls are handled by CGBultin and not CGCall. 
It's a different code path.
Nuno 




More information about the cfe-commits mailing list