tsan: properly instrument unaligned accesses
authorDmitry Vyukov <dvyukov@google.com>
Tue, 27 Jan 2015 20:19:17 +0000 (20:19 +0000)
committerDmitry Vyukov <dvyukov@google.com>
Tue, 27 Jan 2015 20:19:17 +0000 (20:19 +0000)
commita18b3e06fca71e9f3e45b767c802436794668bdd
tree32791d365a7054935a5b98c03ef9c43c3dbf9472
parente67f5de1f7391dac00f4c8f99327b08b7a377c91
tsan: properly instrument unaligned accesses

If a memory access is unaligned, emit __tsan_unaligned_read/write
callbacks instead of __tsan_read/write.
Required to change semantics of __tsan_unaligned_read/write to not do the user memory.
But since they were unused (other than through __sanitizer_unaligned_load/store) this is fine.
Fixes long standing issue 17:
https://code.google.com/p/thread-sanitizer/issues/detail?id=17

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227231 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Instrumentation/ThreadSanitizer.cpp
test/Instrumentation/ThreadSanitizer/unaligned.ll [new file with mode: 0644]