forked from OSchip/llvm-project
Add the object size checking support for a few other builtins.
The functions memccpy, strdup, strndup, strlcat, and strlcpy should also have object size checking support. Of course, this is only good if the C library also supports these functions. <rdar://problem/10528974> llvm-svn: 152789
This commit is contained in:
parent
4813fc8ed6
commit
30d03483ff
|
@ -452,12 +452,17 @@ BUILTIN(__builtin_extend_pointer, "ULLiv*", "n") // _Unwind_Word == uint64_t
|
|||
// GCC Object size checking builtins
|
||||
BUILTIN(__builtin_object_size, "zvC*i", "n")
|
||||
BUILTIN(__builtin___memcpy_chk, "v*v*vC*zz", "nF")
|
||||
BUILTIN(__builtin___memccpy_chk, "v*v*vC*iz", "nF")
|
||||
BUILTIN(__builtin___memmove_chk, "v*v*vC*zz", "nF")
|
||||
BUILTIN(__builtin___mempcpy_chk, "v*v*vC*zz", "nF")
|
||||
BUILTIN(__builtin___memset_chk, "v*v*izz", "nF")
|
||||
BUILTIN(__builtin___stpcpy_chk, "c*c*cC*z", "nF")
|
||||
BUILTIN(__builtin___strcat_chk, "c*c*cC*z", "nF")
|
||||
BUILTIN(__builtin___strcpy_chk, "c*c*cC*z", "nF")
|
||||
BUILTIN(__builtin___strdup_chk, "c*cC*z", "nF")
|
||||
BUILTIN(__builtin___strndup_chk, "c*cC*zz", "nF")
|
||||
BUILTIN(__builtin___strlcat_chk, "c*c*cC*zz", "nF")
|
||||
BUILTIN(__builtin___strlcpy_chk, "c*c*cC*zz", "nF")
|
||||
BUILTIN(__builtin___strncat_chk, "c*c*cC*zz", "nF")
|
||||
BUILTIN(__builtin___strncpy_chk, "c*c*cC*zz", "nF")
|
||||
BUILTIN(__builtin___stpncpy_chk, "c*c*cC*zz", "nF")
|
||||
|
|
Loading…
Reference in New Issue