diff options
author | wmi <wmi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-22 21:56:58 +0000 |
---|---|---|
committer | wmi <wmi@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-11-22 21:56:58 +0000 |
commit | b077695d9e39a87da6f8bc68451a9d60467e7020 (patch) | |
tree | 368bbe384fc86dd4c4da764b1d83bb50a9b3ced8 /gcc/sanitizer.def | |
parent | c611e16f65257725d6a4fac5cb95ec0ae51111de (diff) | |
download | gcc-b077695d9e39a87da6f8bc68451a9d60467e7020.tar.gz |
2012-11-22 Dmitry Vyukov <dvyukov@google.com>
Wei Mi <wmi@google.com>
* builtins.def (DEF_SANITIZER_BUILTIN): Define tsan builtins.
* sanitizer.def: Ditto.
* Makefile.in (tsan.o): Add tsan.o target.
(BUILTINS_DEF): Add sanitizer.def.
* passes.c (init_optimization_passes): Add tsan passes.
* tree-pass.h (register_pass_info): Ditto.
* toplev.c (compile_file): Ditto.
* doc/invoke.texi: Document tsan related options.
* gcc.c (LINK_COMMAND_SPEC): Add LIBTSAN_SPEC in link command if
-fsanitize=thread.
* tsan.c: New file about tsan.
* tsan.h: Ditto.
* common.opt: Add -fsanitize=thread.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@193736 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/sanitizer.def')
-rw-r--r-- | gcc/sanitizer.def | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/gcc/sanitizer.def b/gcc/sanitizer.def new file mode 100644 index 00000000000..28518f3a977 --- /dev/null +++ b/gcc/sanitizer.def @@ -0,0 +1,28 @@ +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_INIT, "__tsan_init", + BT_FN_VOID, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_ENTRY, "__tsan_func_entry", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_FUNC_EXIT, "__tsan_func_exit", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_VPTR_UPDATE, "__tsan_vptr_update", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_1, "__tsan_read1", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_2, "__tsan_read2", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_4, "__tsan_read4", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_8, "__tsan_read8", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_16, "__tsan_read16", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_1, "__tsan_write1", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_2, "__tsan_write2", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_4, "__tsan_write4", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_8, "__tsan_write8", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) +DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_16, "__tsan_write16", + BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST) |