[compiler-rt] r227230 - tsan: properly instrument unaligned accesses
Yury Gribov
y.gribov at samsung.com
Fri Jan 30 05:48:14 PST 2015
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.
--
********************
FAIL: ThreadSanitizer :: simple_stack.c (22051 of 22245)
******************** TEST 'ThreadSanitizer :: simple_stack.c' FAILED
********************
Script:
--
/home/ygribov/build/llvm-master-gcc/./bin/clang -fsanitize=thread -Wall
-m64 -gline-tables-only -O1
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/simple_stack.c
-o
/home/ygribov/build/llvm-master-gcc/projects/compiler-rt/test/tsan/Output/simple_stack.c.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/simple_stack.c.tmp
| FileCheck
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/simple_stack.c
--
Exit Code: 1
Command Output (stderr):
--
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/simple_stack.c:52:16:
error: expected string not found in input
// CHECK-NEXT: #0 foo1{{.*}} {{.*}}simple_stack.c:7{{(:10)?}} ({{.*}})
^
<stdin>:4:2: note: scanning from here
#0 foo1
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/simple_stack.c:7:3
(simple_stack.c.tmp+0x0000004962a4)
^
<stdin>:5:80: note: possible intended match here
#1 bar1
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/simple_stack.c:12:3
(simple_stack.c.tmp+0x0000004962f4)
^
--
********************
FAIL: ThreadSanitizer :: simple_stack2.cc (22053 of 22245)
******************** TEST 'ThreadSanitizer :: simple_stack2.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/simple_stack2.cc
-o
/home/ygribov/build/llvm-master-gcc/projects/compiler-rt/test/tsan/Output/simple_stack2.cc.exe
&&
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/deflake.bash /home/ygribov/build/llvm-master-gcc/projects/compiler-rt/test/tsan/Output/simple_stack2.cc.exe
| FileCheck
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/simple_stack2.cc
--
Exit Code: 1
Command Output (stderr):
--
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/simple_stack2.cc:47:16:
error: expected string not found in input
// CHECK-NEXT: #0 foo1{{.*}} {{.*}}simple_stack2.cc:7{{(:10)?}}
(simple_stack2.cc.exe+{{.*}})
^
<stdin>:4:2: note: scanning from here
#0 foo1()
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/simple_stack2.cc:7:3
(simple_stack2.cc.exe+0x000000496374)
^
<stdin>:4:57: note: possible intended match here
#0 foo1()
/home/ygribov/src/llvm-master/projects/compiler-rt/test/tsan/simple_stack2.cc:7:3
(simple_stack2.cc.exe+0x000000496374)
More information about the llvm-commits
mailing list