aboutsummaryrefslogtreecommitdiff
path: root/gcc/sanitizer.def
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2014-05-30 20:37:05 +0200
committerJakub Jelinek <jakub@gcc.gnu.org>2014-05-30 20:37:05 +0200
commit40f9f6bb0ead69f2e09b62341e91a0f9643afe3f (patch)
tree3326b794ec3e297e31dd9c81d4f4177c48d5ae5f /gcc/sanitizer.def
parent8465be9f1d5755379686743fb33aafbbfd77dfb3 (diff)
downloadgcc-40f9f6bb0ead69f2e09b62341e91a0f9643afe3f.zip
gcc-40f9f6bb0ead69f2e09b62341e91a0f9643afe3f.tar.gz
gcc-40f9f6bb0ead69f2e09b62341e91a0f9643afe3f.tar.bz2
sanitizer.def (BUILT_IN_ASAN_REPORT_LOAD_N, [...]): New.
* sanitizer.def (BUILT_IN_ASAN_REPORT_LOAD_N, BUILT_IN_ASAN_REPORT_STORE_N): New. * asan.c (struct asan_mem_ref): Change access_size type to HOST_WIDE_INT. (asan_mem_ref_init, asan_mem_ref_new, get_mem_refs_of_builtin_call, update_mem_ref_hash_table): Likewise. (asan_mem_ref_hasher::hash): Hash in a HWI. (report_error_func): Change size_in_bytes argument to HWI. Use *_N builtins if size_in_bytes is larger than 16 or not power of two. (build_shadow_mem_access): New function. (build_check_stmt): Use it. Change size_in_bytes argument to HWI. Handle size_in_bytes not power of two or larger than 16. (instrument_derefs): Don't give up if size_in_bytes is not power of two or is larger than 16. From-SVN: r211091
Diffstat (limited to 'gcc/sanitizer.def')
-rw-r--r--gcc/sanitizer.def6
1 files changed, 6 insertions, 0 deletions
diff --git a/gcc/sanitizer.def b/gcc/sanitizer.def
index a2f7ff0..4016fc5 100644
--- a/gcc/sanitizer.def
+++ b/gcc/sanitizer.def
@@ -41,6 +41,9 @@ DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD8, "__asan_report_load8",
BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD16, "__asan_report_load16",
BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_LOAD_N, "__asan_report_load_n",
+ BT_FN_VOID_PTR_PTRMODE,
+ ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE1, "__asan_report_store1",
BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE2, "__asan_report_store2",
@@ -51,6 +54,9 @@ DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE8, "__asan_report_store8",
BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE16, "__asan_report_store16",
BT_FN_VOID_PTR, ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REPORT_STORE_N, "__asan_report_store_n",
+ BT_FN_VOID_PTR_PTRMODE,
+ ATTR_TMPURE_NORETURN_NOTHROW_LEAF_LIST)
DEF_SANITIZER_BUILTIN(BUILT_IN_ASAN_REGISTER_GLOBALS,
"__asan_register_globals",
BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)