[compiler-rt] 9cf5220 - [dfsan] Updated check_custom_wrappers.sh to dedup function names

Jianzhou Zhao via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 15 12:12:36 PDT 2021


Author: Jianzhou Zhao
Date: 2021-03-15T19:12:08Z
New Revision: 9cf5220c5c4af0ec1d0abeb2b5c92bb44b6e217d

URL: https://github.com/llvm/llvm-project/commit/9cf5220c5c4af0ec1d0abeb2b5c92bb44b6e217d
DIFF: https://github.com/llvm/llvm-project/commit/9cf5220c5c4af0ec1d0abeb2b5c92bb44b6e217d.diff

LOG: [dfsan] Updated check_custom_wrappers.sh to dedup function names

The origin wrappers added by https://reviews.llvm.org/D98359 reuse
those __dfsw_ functions.

Added: 
    

Modified: 
    compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh

Removed: 
    


################################################################################
diff  --git a/compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh b/compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh
index 041e2dce4763..5f7160eb1478 100755
--- a/compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh
+++ b/compiler-rt/lib/dfsan/scripts/check_custom_wrappers.sh
@@ -24,7 +24,7 @@ grep -E "^fun:.*=custom" ${DFSAN_ABI_LIST} \
   | sed "s/^fun:\(.*\)=custom.*/\1/" | sort > $DIFF_A
 grep -E "__dfsw.*\(" ${DFSAN_CUSTOM_WRAPPERS} \
   | grep -v "__sanitizer_cov_trace" \
-  | sed "s/.*__dfsw_\(.*\)(.*/\1/" | sort > $DIFF_B
+  | sed "s/.*__dfsw_\(.*\)(.*/\1/" | sort | uniq > $DIFF_B
 
diff  -u $DIFF_A $DIFF_B > ${DIFFOUT}
 if [ $? -ne 0 ]
 then
@@ -35,7 +35,7 @@ fi
 
 grep -E __dfsw_ ${DFSAN_CUSTOM_WRAPPERS} \
   | grep -v "__sanitizer_cov_trace" \
-  | sed "s/.*__dfsw_\([^(]*\).*/\1/" | sort > $DIFF_A
+  | sed "s/.*__dfsw_\([^(]*\).*/\1/" | sort | uniq > $DIFF_A
 grep -E "^[[:space:]]*test_.*\(\);" ${DFSAN_CUSTOM_TESTS} \
   | sed "s/.*test_\(.*\)();/\1/" | sort > $DIFF_B
 
diff  -u $DIFF_A $DIFF_B > ${DIFFOUT}


        


More information about the llvm-commits mailing list