[PATCH] Check for null pointers in ubsan

Nuno Lopes nunoplopes at sapo.pt
Mon May 11 12:00:53 PDT 2015


gcc 4.9 just got more aggressive and is now exploiting the fact that input pointers to memcpy/memmove cannot be null (even if the size is 0).
This patch adds support to ubsan to check for this UB. Very important since it's already being exploited by gcc.

REPOSITORY
  rL LLVM

http://reviews.llvm.org/D9673

Files:
  lib/CodeGen/CGBuiltin.cpp
  lib/CodeGen/CGCall.cpp
  lib/CodeGen/CodeGenFunction.h
  test/CodeGen/catch-undef-behavior.c

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9673.25492.patch
Type: text/x-patch
Size: 6050 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150511/5a3c15ea/attachment.bin>


More information about the cfe-commits mailing list