]> git.ipfire.org Git - thirdparty/gcc.git/commit
backport: re PR sanitizer/79944 (asan: incorrect instrumentation of atomic operations)
authorJakub Jelinek <jakub@redhat.com>
Tue, 30 May 2017 08:13:33 +0000 (10:13 +0200)
committerJakub Jelinek <jakub@gcc.gnu.org>
Tue, 30 May 2017 08:13:33 +0000 (10:13 +0200)
commit4ff2190b680908df7dbe8a50439983c5ec9b3e3e
tree6a79dd09ceb1e7ca15f8df6660b0f8764905a4fb
parenta8072ee317d80b74a3f1240a4f23e68a34979016
backport: re PR sanitizer/79944 (asan: incorrect instrumentation of atomic operations)

Backported from mainline
2017-03-09  Jakub Jelinek  <jakub@redhat.com>

PR sanitizer/79944
* asan.c (get_mem_refs_of_builtin_call): For BUILT_IN_ATOMIC* and
BUILT_IN_SYNC*, determine the access type from the size suffix and
always build a MEM_REF with that type.  Handle forgotten
BUILT_IN_SYNC_FETCH_AND_NAND_16 and BUILT_IN_SYNC_NAND_AND_FETCH_16.

* c-c++-common/asan/pr79944.c: New test.

From-SVN: r248658
gcc/ChangeLog
gcc/asan.c
gcc/testsuite/ChangeLog
gcc/testsuite/c-c++-common/asan/pr79944.c [new file with mode: 0644]