[compiler-rt] r253077 - [tsan] Expect memmove interceptor to be called from memcpy

Kuba Brecka via llvm-commits llvm-commits at lists.llvm.org
Fri Nov 13 12:41:38 PST 2015


Author: kuba.brecka
Date: Fri Nov 13 14:41:37 2015
New Revision: 253077

URL: http://llvm.org/viewvc/llvm-project?rev=253077&view=rev
Log:
[tsan] Expect memmove interceptor to be called from memcpy

On OS X, memcpy and memmove are actually aliases of the same function, so the memmove interceptor can be invoked on a call to memcpy. This patch updates the tests to expect either memmove or memcpy on a stack trace.

Differential Revision: http://reviews.llvm.org/D14638


Modified:
    compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc
    compiler-rt/trunk/test/tsan/memcmp_race.cc
    compiler-rt/trunk/test/tsan/memcpy_race.cc

Modified: compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc?rev=253077&r1=253076&r2=253077&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc (original)
+++ compiler-rt/trunk/test/tsan/inlined_memcpy_race.cc Fri Nov 13 14:41:37 2015
@@ -32,6 +32,6 @@ int main() {
 // CHECK:   #0 memset
 // CHECK:   #1 MemSetThread
 // CHECK:  Previous write
-// CHECK:   #0 memcpy
+// CHECK:   #0 {{(memcpy|memmove)}}
 // CHECK:   #1 MemCpyThread
 

Modified: compiler-rt/trunk/test/tsan/memcmp_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/memcmp_race.cc?rev=253077&r1=253076&r2=253077&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/memcmp_race.cc (original)
+++ compiler-rt/trunk/test/tsan/memcmp_race.cc Fri Nov 13 14:41:37 2015
@@ -35,7 +35,7 @@ int main() {
 // CHECK: addr=[[ADDR:0x[0-9,a-f]+]]
 // CHECK: WARNING: ThreadSanitizer: data race
 // CHECK:   Write of size 1 at [[ADDR]] by thread T2:
-// CHECK:     #0 memcpy
+// CHECK:     #0 {{(memcpy|memmove)}}
 // CHECK:     #1 Thread2
 // CHECK:   Previous read of size 1 at [[ADDR]] by thread T1:
 // CHECK:     #0 memcmp

Modified: compiler-rt/trunk/test/tsan/memcpy_race.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/memcpy_race.cc?rev=253077&r1=253076&r2=253077&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/memcpy_race.cc (original)
+++ compiler-rt/trunk/test/tsan/memcpy_race.cc Fri Nov 13 14:41:37 2015
@@ -34,8 +34,8 @@ int main() {
 // CHECK: addr=[[ADDR:0x[0-9,a-f]+]]
 // CHECK: WARNING: ThreadSanitizer: data race
 // CHECK:   Write of size 1 at [[ADDR]] by thread T2:
-// CHECK:     #0 memcpy
+// CHECK:     #0 {{(memcpy|memmove)}}
 // CHECK:     #1 Thread2
 // CHECK:   Previous write of size 1 at [[ADDR]] by thread T1:
-// CHECK:     #0 memcpy
+// CHECK:     #0 {{(memcpy|memmove)}}
 // CHECK:     #1 Thread1




More information about the llvm-commits mailing list