[compiler-rt] r243721 - [libFuzzer] prepare for __sanitizer_cov_trace_switch in libFuzzer and sanitizer coverage. Also fix pedantic warnings
Kostya Serebryany
kcc at google.com
Thu Jul 30 18:07:12 PDT 2015
Author: kcc
Date: Thu Jul 30 20:07:12 2015
New Revision: 243721
URL: http://llvm.org/viewvc/llvm-project?rev=243721&view=rev
Log:
[libFuzzer] prepare for __sanitizer_cov_trace_switch in libFuzzer and sanitizer coverage. Also fix pedantic warnings
Modified:
compiler-rt/trunk/lib/asan/asan_win_dll_thunk.cc
compiler-rt/trunk/lib/dfsan/dfsan_custom.cc
compiler-rt/trunk/lib/dfsan/done_abilist.txt
compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
Modified: compiler-rt/trunk/lib/asan/asan_win_dll_thunk.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/asan/asan_win_dll_thunk.cc?rev=243721&r1=243720&r2=243721&view=diff
==============================================================================
--- compiler-rt/trunk/lib/asan/asan_win_dll_thunk.cc (original)
+++ compiler-rt/trunk/lib/asan/asan_win_dll_thunk.cc Thu Jul 30 20:07:12 2015
@@ -308,6 +308,7 @@ INTERFACE_FUNCTION(__sanitizer_cov_modul
INTERFACE_FUNCTION(__sanitizer_cov_trace_basic_block)
INTERFACE_FUNCTION(__sanitizer_cov_trace_func_enter)
INTERFACE_FUNCTION(__sanitizer_cov_trace_cmp)
+INTERFACE_FUNCTION(__sanitizer_cov_trace_switch)
INTERFACE_FUNCTION(__sanitizer_cov_with_check)
INTERFACE_FUNCTION(__sanitizer_get_allocated_size)
INTERFACE_FUNCTION(__sanitizer_get_coverage_guards)
Modified: compiler-rt/trunk/lib/dfsan/dfsan_custom.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/dfsan_custom.cc?rev=243721&r1=243720&r2=243721&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/dfsan_custom.cc (original)
+++ compiler-rt/trunk/lib/dfsan/dfsan_custom.cc Thu Jul 30 20:07:12 2015
@@ -93,7 +93,7 @@ SANITIZER_INTERFACE_ATTRIBUTE char *__df
DECLARE_WEAK_INTERCEPTOR_HOOK(dfsan_weak_hook_memcmp, uptr caller_pc,
const void *s1, const void *s2, size_t n,
dfsan_label s1_label, dfsan_label s2_label,
- dfsan_label n_label);
+ dfsan_label n_label)
SANITIZER_INTERFACE_ATTRIBUTE int __dfsw_memcmp(const void *s1, const void *s2,
size_t n, dfsan_label s1_label,
@@ -162,7 +162,7 @@ __dfsw_strcasecmp(const char *s1, const
DECLARE_WEAK_INTERCEPTOR_HOOK(dfsan_weak_hook_strncmp, uptr caller_pc,
const char *s1, const char *s2, size_t n,
dfsan_label s1_label, dfsan_label s2_label,
- dfsan_label n_label);
+ dfsan_label n_label)
SANITIZER_INTERFACE_ATTRIBUTE int __dfsw_strncmp(const char *s1, const char *s2,
size_t n, dfsan_label s1_label,
Modified: compiler-rt/trunk/lib/dfsan/done_abilist.txt
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/dfsan/done_abilist.txt?rev=243721&r1=243720&r2=243721&view=diff
==============================================================================
--- compiler-rt/trunk/lib/dfsan/done_abilist.txt (original)
+++ compiler-rt/trunk/lib/dfsan/done_abilist.txt Thu Jul 30 20:07:12 2015
@@ -266,6 +266,9 @@ fun:reflect.makeFuncStub=discard
# Replaces __sanitizer_cov_trace_cmp with __dfsw___sanitizer_cov_trace_cmp
fun:__sanitizer_cov_trace_cmp=custom
fun:__sanitizer_cov_trace_cmp=uninstrumented
+# Similar for __sanitizer_cov_trace_switch
+fun:__sanitizer_cov_trace_switch=custom
+fun:__sanitizer_cov_trace_switch=uninstrumented
# Ignores all other __sanitizer callbacks.
fun:__sanitizer_cov=uninstrumented
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc?rev=243721&r1=243720&r2=243721&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_common_interceptors.inc Thu Jul 30 20:07:12 2015
@@ -220,7 +220,7 @@ INTERCEPTOR(int, strcmp, const char *s1,
}
DECLARE_WEAK_INTERCEPTOR_HOOK(__sanitizer_weak_hook_strncmp, uptr called_pc,
- const char *s1, const char *s2, uptr n);
+ const char *s1, const char *s2, uptr n)
INTERCEPTOR(int, strncmp, const char *s1, const char *s2, uptr size) {
if (COMMON_INTERCEPTOR_NOTHING_IS_INITIALIZED)
@@ -386,7 +386,7 @@ INTERCEPTOR(char *, strpbrk, const char
#if SANITIZER_INTERCEPT_MEMCMP
DECLARE_WEAK_INTERCEPTOR_HOOK(__sanitizer_weak_hook_memcmp, uptr called_pc,
- const void *s1, const void *s2, uptr n);
+ const void *s1, const void *s2, uptr n)
INTERCEPTOR(int, memcmp, const void *a1, const void *a2, uptr size) {
void *ctx;
Modified: compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc?rev=243721&r1=243720&r2=243721&view=diff
==============================================================================
--- compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc (original)
+++ compiler-rt/trunk/lib/sanitizer_common/sanitizer_coverage_libcdep.cc Thu Jul 30 20:07:12 2015
@@ -931,7 +931,9 @@ SANITIZER_INTERFACE_ATTRIBUTE
uptr __sanitizer_update_counter_bitset_and_clear_counters(u8 *bitset) {
return coverage_data.Update8bitCounterBitsetAndClearCounters(bitset);
}
-// Default empty implementation (weak). Users should redefine it.
+// Default empty implementations (weak). Users should redefine them.
SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
void __sanitizer_cov_trace_cmp() {}
+SANITIZER_INTERFACE_ATTRIBUTE SANITIZER_WEAK_ATTRIBUTE
+void __sanitizer_cov_trace_switch() {}
} // extern "C"
More information about the llvm-commits
mailing list