aboutsummaryrefslogtreecommitdiff
path: root/lib/tsan/check_memcpy.sh
diff options
context:
space:
mode:
Diffstat (limited to 'lib/tsan/check_memcpy.sh')
-rwxr-xr-xlib/tsan/check_memcpy.sh31
1 files changed, 0 insertions, 31 deletions
diff --git a/lib/tsan/check_memcpy.sh b/lib/tsan/check_memcpy.sh
deleted file mode 100755
index 101df1166b7c..000000000000
--- a/lib/tsan/check_memcpy.sh
+++ /dev/null
@@ -1,31 +0,0 @@
-#!/bin/bash
-
-# Ensure that tsan runtime does not contain compiler-emitted memcpy and memset calls.
-
-set -eu
-
-ROOTDIR=$(dirname $0)
-TEST_DIR=$ROOTDIR/../../test/tsan
-
-: ${CXX:=clang++}
-CFLAGS="-fsanitize=thread -fPIE -O1 -g"
-LDFLAGS="-pie -lpthread -ldl -lrt -lm -Wl,--whole-archive $ROOTDIR/rtl/libtsan.a -Wl,--no-whole-archive"
-
-SRC=$TEST_DIR/simple_race.cc
-OBJ=$SRC.o
-EXE=$SRC.exe
-$CXX $SRC $CFLAGS -c -o $OBJ
-$CXX $OBJ $LDFLAGS -o $EXE
-
-NCALL=$(objdump -d $EXE | egrep "callq .*<__interceptor_mem(cpy|set)>" | wc -l)
-if [ "$NCALL" != "0" ]; then
- echo FAIL: found $NCALL memcpy/memset calls
- exit 1
-fi
-
-# tail calls
-NCALL=$(objdump -d $EXE | egrep "jmpq .*<__interceptor_mem(cpy|set)>" | wc -l)
-if [ "$NCALL" != "0" ]; then
- echo FAIL: found $NCALL memcpy/memset calls
- exit 1
-fi