aboutsummaryrefslogtreecommitdiff
path: root/gcc/sanitizer.def
diff options
context:
space:
mode:
authorBernd Edlinger <bernd.edlinger@hotmail.de>2015-01-02 22:16:59 +0000
committerBernd Edlinger <edlinger@gcc.gnu.org>2015-01-02 22:16:59 +0000
commitfe86867f07504f643ab9bf1147bac785222cadb0 (patch)
tree2e150e026804c390ac9333406e3d7552c6a62711 /gcc/sanitizer.def
parente4dd5b691d56f11c225e1e1847be3800854634b6 (diff)
downloadgcc-fe86867f07504f643ab9bf1147bac785222cadb0.zip
gcc-fe86867f07504f643ab9bf1147bac785222cadb0.tar.gz
gcc-fe86867f07504f643ab9bf1147bac785222cadb0.tar.bz2
Instrument bit field and unaligned accesses for TSAN.
gcc/ChangeLog: 2015-01-02 Bernd Edlinger <bernd.edlinger@hotmail.de> Instrument bit field and unaligned accesses for TSAN. * sanitizer.def (BUILT_IN_TSAN_READ_RANGE): New built-in function. (BUILT_IN_TSAN_WRITE_RANGE): New built-in function. * tsan.c (instrument_expr): Handle COMPONENT_REF and BIT_FIELD_REF. Use BUILT_IN_TSAN_READ_RANGE and BUILT_IN_TSAN_WRITE_RANGE for unaligned memory regions. testsuite/ChangeLog: 2015-01-02 Bernd Edlinger <bernd.edlinger@hotmail.de> * c-c++-common/tsan/bitfield_race.c: New testcase. * g++.dg/tsan/aligned_vs_unaligned_race.C: Fixed. From-SVN: r219150
Diffstat (limited to 'gcc/sanitizer.def')
-rw-r--r--gcc/sanitizer.def4
1 files changed, 4 insertions, 0 deletions
diff --git a/gcc/sanitizer.def b/gcc/sanitizer.def
index 3fc8c83..723348e 100644
--- a/gcc/sanitizer.def
+++ b/gcc/sanitizer.def
@@ -188,6 +188,10 @@ DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE8, "__tsan_write8",
BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE16, "__tsan_write16",
BT_FN_VOID_PTR, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_READ_RANGE, "__tsan_read_range",
+ BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
+DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_WRITE_RANGE, "__tsan_write_range",
+ BT_FN_VOID_PTR_PTRMODE, ATTR_NOTHROW_LEAF_LIST)
DEF_SANITIZER_BUILTIN(BUILT_IN_TSAN_ATOMIC8_LOAD,
"__tsan_atomic8_load",