[compiler-rt] r227230 - tsan: properly instrument unaligned accesses

Yury Gribov y.gribov at samsung.com
Sun Feb 1 23:33:32 PST 2015


On 02/01/2015 11:00 PM, Dmitry Vyukov wrote:
> On Fri, Jan 30, 2015 at 4:48 PM, Yury Gribov <y.gribov at samsung.com> wrote:
>> On 01/27/2015 11:19 PM, Dmitry Vyukov wrote:
>>>
>>> Author: dvyukov
>>> Date: Tue Jan 27 14:19:12 2015
>>> New Revision: 227230
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=227230&view=rev
>>> Log:
>>> 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
>>
>>
>> FYI I've been seeing TSan regressions on Ubuntu 14 lately:
>>
>> FAIL: ThreadSanitizer :: aligned_vs_unaligned_race.cc (21921 of 22245)
>> ******************** TEST 'ThreadSanitizer :: aligned_vs_unaligned_race.cc'
>> FAILED ********************
>> Script:
>> --
>> /home/ygribov/build/llvm-master-gcc/./bin/clang --driver-mode=g++
>> -fsanitize=thread -Wall -m64 -gline-tables-only -O1
>> /home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/aligned_vs_unaligned_race.cc
>> -o
>> /home/ygribov/build/llvm-master-gcc/projects/compiler-rt/test/tsan/Output/aligned_vs_unaligned_race.cc.tmp
>> && /home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/deflake.bash
>> /home/ygribov/build/llvm-master-gcc/projects/compiler-rt/test/tsan/Output/aligned_vs_unaligned_race.cc.tmp
>> | FileCheck
>> /home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/aligned_vs_unaligned_race.cc
>> --
>> Exit Code: 2
>>
>> Command Output (stderr):
>> --
>> FileCheck error: '-' is empty.
>
>
> Hi Yuri,
>
> Please provide exact reproduction instructions.

I was just doing a regular make check-all on TOT Clang+LLVM+compiler-rt.

I configured with -DLLVM_TARGETS_TO_BUILD=X86 
-DCOMPILER_RT_BUILD_SHARED_ASAN=ON and used standard system compiler 
(Ubuntu 4.8.2-19ubuntu1).

-Y




More information about the llvm-commits mailing list