From: Matt Morehouse Date: Thu, 17 Sep 2020 15:43:26 +0000 (-0700) Subject: Revert "[DFSan] Add bcmp wrapper." X-Git-Tag: llvmorg-13-init~11717 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=df017fd906bba81af38749fe374ae2635fd51389;p=platform%2Fupstream%2Fllvm.git Revert "[DFSan] Add bcmp wrapper." This reverts commit 559f9198125392bfa8e7d462aa8e87fcf5030185 due to bot failure. --- diff --git a/compiler-rt/lib/dfsan/dfsan_custom.cpp b/compiler-rt/lib/dfsan/dfsan_custom.cpp index 81fa1bf..eb26bea 100644 --- a/compiler-rt/lib/dfsan/dfsan_custom.cpp +++ b/compiler-rt/lib/dfsan/dfsan_custom.cpp @@ -129,14 +129,6 @@ SANITIZER_INTERFACE_ATTRIBUTE int __dfsw_memcmp(const void *s1, const void *s2, return 0; } -SANITIZER_INTERFACE_ATTRIBUTE int __dfsw_bcmp(const void *s1, const void *s2, - size_t n, dfsan_label s1_label, - dfsan_label s2_label, - dfsan_label n_label, - dfsan_label *ret_label) { - return __dfsw_memcmp(s1, s2, n, s1_label, s2_label, n_label, ret_label); -} - DECLARE_WEAK_INTERCEPTOR_HOOK(dfsan_weak_hook_strcmp, uptr caller_pc, const char *s1, const char *s2, dfsan_label s1_label, dfsan_label s2_label) diff --git a/compiler-rt/lib/dfsan/done_abilist.txt b/compiler-rt/lib/dfsan/done_abilist.txt index 85255f7..52f3ff5 100644 --- a/compiler-rt/lib/dfsan/done_abilist.txt +++ b/compiler-rt/lib/dfsan/done_abilist.txt @@ -183,7 +183,6 @@ fun:strtoull=custom # Functions that produce an output that is computed from the input, but is not # necessarily data dependent. -fun:bcmp=custom fun:memchr=custom fun:memcmp=custom fun:strcasecmp=custom diff --git a/compiler-rt/test/dfsan/custom.cpp b/compiler-rt/test/dfsan/custom.cpp index 6d5e06a..7802f88 100644 --- a/compiler-rt/test/dfsan/custom.cpp +++ b/compiler-rt/test/dfsan/custom.cpp @@ -17,13 +17,12 @@ #include #include #include -#include #include +#include #include #include -#include -#include #include +#include #include #include #include @@ -87,24 +86,6 @@ void test_memcmp() { #endif } -void test_bcmp() { - char str1[] = "str1", str2[] = "str2"; - dfsan_set_label(i_label, &str1[3], 1); - dfsan_set_label(j_label, &str2[3], 1); - - int rv = bcmp(str1, str2, sizeof(str1)); - assert(rv != 0); -#ifdef STRICT_DATA_DEPENDENCIES - ASSERT_ZERO_LABEL(rv); -#else - ASSERT_LABEL(rv, i_j_label); -#endif - - rv = bcmp(str1, str2, sizeof(str1) - 2); - assert(rv == 0); - ASSERT_ZERO_LABEL(rv); -} - void test_memcpy() { char str1[] = "str1"; char str2[sizeof(str1)]; @@ -986,7 +967,6 @@ int main(void) { assert(i_j_label != j_label); assert(i_j_label != k_label); - test_bcmp(); test_calloc(); test_clock_gettime(); test_ctime_r();