re PR sanitizer/55439 (ThreadSanitizer: handle atomic operations)
authorJakub Jelinek <jakub@redhat.com>
Tue, 4 Dec 2012 13:20:20 +0000 (14:20 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 4 Dec 2012 13:20:20 +0000 (14:20 +0100)
commitc954bddd5fbafeb558aea958cafa970677740b23
tree21044204031b54a990ff0b62ce262c476b707eda
parent41d37c5656b03f992c97e29f74241ba1d24e3cd8
re PR sanitizer/55439 (ThreadSanitizer: handle atomic operations)

PR sanitizer/55439
* Makefile.in (tsan.o): Depend on tree-ssa-propagate.h.
* sanitizer.def: Add __tsan_atomic* builtins.
* asan.c (initialize_sanitizer_builtins): Adjust to also
initialize __tsan_atomic* builtins.
* tsan.c: Include tree-ssa-propagate.h.
(enum tsan_atomic_action): New enum.
(tsan_atomic_table): New table.
(instrument_builtin_call): New function.
(instrument_gimple): Take pointer to gimple_stmt_iterator
instead of gimple_stmt_iterator.  Call instrument_builtin_call
on builtin call stmts.
(instrument_memory_accesses): Adjust instrument_gimple caller.
* builtin-types.def (BT_FN_BOOL_VPTR_PTR_I1_INT_INT,
BT_FN_BOOL_VPTR_PTR_I2_INT_INT, BT_FN_BOOL_VPTR_PTR_I4_INT_INT,
BT_FN_BOOL_VPTR_PTR_I8_INT_INT, BT_FN_BOOL_VPTR_PTR_I16_INT_INT): New.

From-SVN: r194133
gcc/ChangeLog
gcc/Makefile.in
gcc/asan.c
gcc/builtin-types.def
gcc/sanitizer.def
gcc/tsan.c